< prev index next >

src/share/vm/opto/compile.hpp

Print this page
rev 11416 : [mq]: With tiered C2 should not mark methods as not compilable with all tiers


 806 
 807   // Are there candidate expensive nodes for optimization?
 808   bool should_optimize_expensive_nodes(PhaseIterGVN &igvn);
 809   // Check whether n1 and n2 are similar
 810   static int cmp_expensive_nodes(Node* n1, Node* n2);
 811   // Sort expensive nodes to locate similar expensive nodes
 812   void sort_expensive_nodes();
 813 
 814   // Compilation environment.
 815   Arena*      comp_arena()           { return &_comp_arena; }
 816   ciEnv*      env() const            { return _env; }
 817   CompileLog* log() const            { return _log; }
 818   bool        failing() const        { return _env->failing() || _failure_reason != NULL; }
 819   const char* failure_reason() const { return (_env->failing()) ? _env->failure_reason() : _failure_reason; }
 820 
 821   bool failure_reason_is(const char* r) const {
 822     return (r == _failure_reason) || (r != NULL && _failure_reason != NULL && strcmp(r, _failure_reason) == 0);
 823   }
 824 
 825   void record_failure(const char* reason);
 826   void record_method_not_compilable(const char* reason, bool all_tiers = false) {
 827     // All bailouts cover "all_tiers" when TieredCompilation is off.
 828     if (!TieredCompilation) all_tiers = true;
 829     env()->record_method_not_compilable(reason, all_tiers);
 830     // Record failure reason.
 831     record_failure(reason);
 832   }
 833   void record_method_not_compilable_all_tiers(const char* reason) {
 834     record_method_not_compilable(reason, true);
 835   }
 836   bool check_node_count(uint margin, const char* reason) {
 837     if (live_nodes() + margin > max_node_limit()) {
 838       record_method_not_compilable(reason);
 839       return true;
 840     } else {
 841       return false;
 842     }
 843   }
 844 
 845   // Node management
 846   uint         unique() const              { return _unique; }
 847   uint         next_unique()               { return _unique++; }
 848   void         set_unique(uint i)          { _unique = i; }
 849   static int   debug_idx()                 { return debug_only(_debug_idx)+0; }
 850   static void  set_debug_idx(int i)        { debug_only(_debug_idx = i); }
 851   Arena*       node_arena()                { return &_node_arena; }
 852   Arena*       old_arena()                 { return &_old_arena; }
 853   RootNode*    root() const                { return _root; }
 854   void         set_root(RootNode* r)       { _root = r; }




 806 
 807   // Are there candidate expensive nodes for optimization?
 808   bool should_optimize_expensive_nodes(PhaseIterGVN &igvn);
 809   // Check whether n1 and n2 are similar
 810   static int cmp_expensive_nodes(Node* n1, Node* n2);
 811   // Sort expensive nodes to locate similar expensive nodes
 812   void sort_expensive_nodes();
 813 
 814   // Compilation environment.
 815   Arena*      comp_arena()           { return &_comp_arena; }
 816   ciEnv*      env() const            { return _env; }
 817   CompileLog* log() const            { return _log; }
 818   bool        failing() const        { return _env->failing() || _failure_reason != NULL; }
 819   const char* failure_reason() const { return (_env->failing()) ? _env->failure_reason() : _failure_reason; }
 820 
 821   bool failure_reason_is(const char* r) const {
 822     return (r == _failure_reason) || (r != NULL && _failure_reason != NULL && strcmp(r, _failure_reason) == 0);
 823   }
 824 
 825   void record_failure(const char* reason);
 826   void record_method_not_compilable(const char* reason) {
 827     // Bailouts cover "all_tiers" when TieredCompilation is off.
 828     env()->record_method_not_compilable(reason, !TieredCompilation);

 829     // Record failure reason.
 830     record_failure(reason);



 831   }
 832   bool check_node_count(uint margin, const char* reason) {
 833     if (live_nodes() + margin > max_node_limit()) {
 834       record_method_not_compilable(reason);
 835       return true;
 836     } else {
 837       return false;
 838     }
 839   }
 840 
 841   // Node management
 842   uint         unique() const              { return _unique; }
 843   uint         next_unique()               { return _unique++; }
 844   void         set_unique(uint i)          { _unique = i; }
 845   static int   debug_idx()                 { return debug_only(_debug_idx)+0; }
 846   static void  set_debug_idx(int i)        { debug_only(_debug_idx = i); }
 847   Arena*       node_arena()                { return &_node_arena; }
 848   Arena*       old_arena()                 { return &_old_arena; }
 849   RootNode*    root() const                { return _root; }
 850   void         set_root(RootNode* r)       { _root = r; }


< prev index next >