src/share/vm/opto/compile.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/compile.hpp

Print this page




 272   // Fixed parameters to this compilation.
 273   const int             _compile_id;
 274   const bool            _save_argument_registers; // save/restore arg regs for trampolines
 275   const bool            _subsume_loads;         // Load can be matched as part of a larger op.
 276   const bool            _do_escape_analysis;    // Do escape analysis.
 277   const bool            _eliminate_boxing;      // Do boxing elimination.
 278   ciMethod*             _method;                // The method being compiled.
 279   int                   _entry_bci;             // entry bci for osr methods.
 280   const TypeFunc*       _tf;                    // My kind of signature
 281   InlineTree*           _ilt;                   // Ditto (temporary).
 282   address               _stub_function;         // VM entry for stub being compiled, or NULL
 283   const char*           _stub_name;             // Name of stub or adapter being compiled, or NULL
 284   address               _stub_entry_point;      // Compile code entry for generated stub, or NULL
 285 
 286   // Control of this compilation.
 287   int                   _num_loop_opts;         // Number of iterations for doing loop optimiztions
 288   int                   _max_inline_size;       // Max inline size for this compilation
 289   int                   _freq_inline_size;      // Max hot method inline size for this compilation
 290   int                   _fixed_slots;           // count of frame slots not allocated by the register
 291                                                 // allocator i.e. locks, original deopt pc, etc.

 292   // For deopt
 293   int                   _orig_pc_slot;
 294   int                   _orig_pc_slot_offset_in_bytes;
 295 
 296   int                   _major_progress;        // Count of something big happening
 297   bool                  _inlining_progress;     // progress doing incremental inlining?
 298   bool                  _inlining_incrementally;// Are we doing incremental inlining (post parse)
 299   bool                  _has_loops;             // True if the method _may_ have some loops
 300   bool                  _has_split_ifs;         // True if the method _may_ have some split-if
 301   bool                  _has_unsafe_access;     // True if the method _may_ produce faults in unsafe loads or stores.
 302   bool                  _has_stringbuilder;     // True StringBuffers or StringBuilders are allocated
 303   bool                  _has_boxed_value;       // True if a boxed object is allocated
 304   int                   _max_vector_size;       // Maximum size of generated vectors
 305   uint                  _trap_hist[trapHistLength];  // Cumulative traps
 306   bool                  _trap_can_recompile;    // Have we emitted a recompiling trap?
 307   uint                  _decompile_count;       // Cumulative decompilation counts.
 308   bool                  _do_inlining;           // True if we intend to do inlining
 309   bool                  _do_scheduling;         // True if we intend to do scheduling
 310   bool                  _do_freq_based_layout;  // True if we intend to do frequency based block layout
 311   bool                  _do_count_invocations;  // True if we generate code to count invocations


 580   void          set_do_scheduling(bool z)       { _do_scheduling = z; }
 581   bool              do_freq_based_layout() const{ return _do_freq_based_layout; }
 582   void          set_do_freq_based_layout(bool z){ _do_freq_based_layout = z; }
 583   bool              do_count_invocations() const{ return _do_count_invocations; }
 584   void          set_do_count_invocations(bool z){ _do_count_invocations = z; }
 585   bool              do_method_data_update() const { return _do_method_data_update; }
 586   void          set_do_method_data_update(bool z) { _do_method_data_update = z; }
 587   bool              age_code() const             { return _age_code; }
 588   void          set_age_code(bool z)             { _age_code = z; }
 589   int               AliasLevel() const           { return _AliasLevel; }
 590   bool              print_assembly() const       { return _print_assembly; }
 591   void          set_print_assembly(bool z)       { _print_assembly = z; }
 592   bool              print_inlining() const       { return _print_inlining; }
 593   void          set_print_inlining(bool z)       { _print_inlining = z; }
 594   bool              print_intrinsics() const     { return _print_intrinsics; }
 595   void          set_print_intrinsics(bool z)     { _print_intrinsics = z; }
 596   RTMState          rtm_state()  const           { return _rtm_state; }
 597   void          set_rtm_state(RTMState s)        { _rtm_state = s; }
 598   bool              use_rtm() const              { return (_rtm_state & NoRTM) == 0; }
 599   bool          profile_rtm() const              { return _rtm_state == ProfileRTM; }



 600   // check the CompilerOracle for special behaviours for this compile
 601   bool          method_has_option(const char * option) {
 602     return method() != NULL && method()->has_option(option);
 603   }
 604   template<typename T>
 605   bool          method_has_option_value(const char * option, T& value) {
 606     return method() != NULL && method()->has_option_value(option, value);
 607   }
 608 #ifndef PRODUCT
 609   bool          trace_opto_output() const       { return _trace_opto_output; }
 610   bool              parsed_irreducible_loop() const { return _parsed_irreducible_loop; }
 611   void          set_parsed_irreducible_loop(bool z) { _parsed_irreducible_loop = z; }
 612   int _in_dump_cnt;  // Required for dumping ir nodes.
 613 #endif
 614   bool              has_irreducible_loop() const { return _has_irreducible_loop; }
 615   void          set_has_irreducible_loop(bool z) { _has_irreducible_loop = z; }
 616 
 617   // JSR 292
 618   bool              has_method_handle_invokes() const { return _has_method_handle_invokes;     }
 619   void          set_has_method_handle_invokes(bool z) {        _has_method_handle_invokes = z; }


 718   CompileLog* log() const            { return _log; }
 719   bool        failing() const        { return _env->failing() || _failure_reason != NULL; }
 720   const char* failure_reason() const { return (_env->failing()) ? _env->failure_reason() : _failure_reason; }
 721 
 722   bool failure_reason_is(const char* r) const {
 723     return (r == _failure_reason) || (r != NULL && _failure_reason != NULL && strcmp(r, _failure_reason) == 0);
 724   }
 725 
 726   void record_failure(const char* reason);
 727   void record_method_not_compilable(const char* reason, bool all_tiers = false) {
 728     // All bailouts cover "all_tiers" when TieredCompilation is off.
 729     if (!TieredCompilation) all_tiers = true;
 730     env()->record_method_not_compilable(reason, all_tiers);
 731     // Record failure reason.
 732     record_failure(reason);
 733   }
 734   void record_method_not_compilable_all_tiers(const char* reason) {
 735     record_method_not_compilable(reason, true);
 736   }
 737   bool check_node_count(uint margin, const char* reason) {
 738     if (live_nodes() + margin > (uint)MaxNodeLimit) {
 739       record_method_not_compilable(reason);
 740       return true;
 741     } else {
 742       return false;
 743     }
 744   }
 745 
 746   // Node management
 747   uint         unique() const              { return _unique; }
 748   uint         next_unique()               { return _unique++; }
 749   void         set_unique(uint i)          { _unique = i; }
 750   static int   debug_idx()                 { return debug_only(_debug_idx)+0; }
 751   static void  set_debug_idx(int i)        { debug_only(_debug_idx = i); }
 752   Arena*       node_arena()                { return &_node_arena; }
 753   Arena*       old_arena()                 { return &_old_arena; }
 754   RootNode*    root() const                { return _root; }
 755   void         set_root(RootNode* r)       { _root = r; }
 756   StartNode*   start() const;              // (Derived from root.)
 757   void         init_start(StartNode* s);
 758   Node*        immutable_memory();




 272   // Fixed parameters to this compilation.
 273   const int             _compile_id;
 274   const bool            _save_argument_registers; // save/restore arg regs for trampolines
 275   const bool            _subsume_loads;         // Load can be matched as part of a larger op.
 276   const bool            _do_escape_analysis;    // Do escape analysis.
 277   const bool            _eliminate_boxing;      // Do boxing elimination.
 278   ciMethod*             _method;                // The method being compiled.
 279   int                   _entry_bci;             // entry bci for osr methods.
 280   const TypeFunc*       _tf;                    // My kind of signature
 281   InlineTree*           _ilt;                   // Ditto (temporary).
 282   address               _stub_function;         // VM entry for stub being compiled, or NULL
 283   const char*           _stub_name;             // Name of stub or adapter being compiled, or NULL
 284   address               _stub_entry_point;      // Compile code entry for generated stub, or NULL
 285 
 286   // Control of this compilation.
 287   int                   _num_loop_opts;         // Number of iterations for doing loop optimiztions
 288   int                   _max_inline_size;       // Max inline size for this compilation
 289   int                   _freq_inline_size;      // Max hot method inline size for this compilation
 290   int                   _fixed_slots;           // count of frame slots not allocated by the register
 291                                                 // allocator i.e. locks, original deopt pc, etc.
 292   uintx                 _max_node_limit;        // Max unique node count during a single compilation.
 293   // For deopt
 294   int                   _orig_pc_slot;
 295   int                   _orig_pc_slot_offset_in_bytes;
 296 
 297   int                   _major_progress;        // Count of something big happening
 298   bool                  _inlining_progress;     // progress doing incremental inlining?
 299   bool                  _inlining_incrementally;// Are we doing incremental inlining (post parse)
 300   bool                  _has_loops;             // True if the method _may_ have some loops
 301   bool                  _has_split_ifs;         // True if the method _may_ have some split-if
 302   bool                  _has_unsafe_access;     // True if the method _may_ produce faults in unsafe loads or stores.
 303   bool                  _has_stringbuilder;     // True StringBuffers or StringBuilders are allocated
 304   bool                  _has_boxed_value;       // True if a boxed object is allocated
 305   int                   _max_vector_size;       // Maximum size of generated vectors
 306   uint                  _trap_hist[trapHistLength];  // Cumulative traps
 307   bool                  _trap_can_recompile;    // Have we emitted a recompiling trap?
 308   uint                  _decompile_count;       // Cumulative decompilation counts.
 309   bool                  _do_inlining;           // True if we intend to do inlining
 310   bool                  _do_scheduling;         // True if we intend to do scheduling
 311   bool                  _do_freq_based_layout;  // True if we intend to do frequency based block layout
 312   bool                  _do_count_invocations;  // True if we generate code to count invocations


 581   void          set_do_scheduling(bool z)       { _do_scheduling = z; }
 582   bool              do_freq_based_layout() const{ return _do_freq_based_layout; }
 583   void          set_do_freq_based_layout(bool z){ _do_freq_based_layout = z; }
 584   bool              do_count_invocations() const{ return _do_count_invocations; }
 585   void          set_do_count_invocations(bool z){ _do_count_invocations = z; }
 586   bool              do_method_data_update() const { return _do_method_data_update; }
 587   void          set_do_method_data_update(bool z) { _do_method_data_update = z; }
 588   bool              age_code() const             { return _age_code; }
 589   void          set_age_code(bool z)             { _age_code = z; }
 590   int               AliasLevel() const           { return _AliasLevel; }
 591   bool              print_assembly() const       { return _print_assembly; }
 592   void          set_print_assembly(bool z)       { _print_assembly = z; }
 593   bool              print_inlining() const       { return _print_inlining; }
 594   void          set_print_inlining(bool z)       { _print_inlining = z; }
 595   bool              print_intrinsics() const     { return _print_intrinsics; }
 596   void          set_print_intrinsics(bool z)     { _print_intrinsics = z; }
 597   RTMState          rtm_state()  const           { return _rtm_state; }
 598   void          set_rtm_state(RTMState s)        { _rtm_state = s; }
 599   bool              use_rtm() const              { return (_rtm_state & NoRTM) == 0; }
 600   bool          profile_rtm() const              { return _rtm_state == ProfileRTM; }
 601   uint              max_node_limit() const       { return (uint)_max_node_limit; }
 602   void          set_max_node_limit(uint n)       { _max_node_limit = n; }
 603 
 604   // check the CompilerOracle for special behaviours for this compile
 605   bool          method_has_option(const char * option) {
 606     return method() != NULL && method()->has_option(option);
 607   }
 608   template<typename T>
 609   bool          method_has_option_value(const char * option, T& value) {
 610     return method() != NULL && method()->has_option_value(option, value);
 611   }
 612 #ifndef PRODUCT
 613   bool          trace_opto_output() const       { return _trace_opto_output; }
 614   bool              parsed_irreducible_loop() const { return _parsed_irreducible_loop; }
 615   void          set_parsed_irreducible_loop(bool z) { _parsed_irreducible_loop = z; }
 616   int _in_dump_cnt;  // Required for dumping ir nodes.
 617 #endif
 618   bool              has_irreducible_loop() const { return _has_irreducible_loop; }
 619   void          set_has_irreducible_loop(bool z) { _has_irreducible_loop = z; }
 620 
 621   // JSR 292
 622   bool              has_method_handle_invokes() const { return _has_method_handle_invokes;     }
 623   void          set_has_method_handle_invokes(bool z) {        _has_method_handle_invokes = z; }


 722   CompileLog* log() const            { return _log; }
 723   bool        failing() const        { return _env->failing() || _failure_reason != NULL; }
 724   const char* failure_reason() const { return (_env->failing()) ? _env->failure_reason() : _failure_reason; }
 725 
 726   bool failure_reason_is(const char* r) const {
 727     return (r == _failure_reason) || (r != NULL && _failure_reason != NULL && strcmp(r, _failure_reason) == 0);
 728   }
 729 
 730   void record_failure(const char* reason);
 731   void record_method_not_compilable(const char* reason, bool all_tiers = false) {
 732     // All bailouts cover "all_tiers" when TieredCompilation is off.
 733     if (!TieredCompilation) all_tiers = true;
 734     env()->record_method_not_compilable(reason, all_tiers);
 735     // Record failure reason.
 736     record_failure(reason);
 737   }
 738   void record_method_not_compilable_all_tiers(const char* reason) {
 739     record_method_not_compilable(reason, true);
 740   }
 741   bool check_node_count(uint margin, const char* reason) {
 742     if (live_nodes() + margin > max_node_limit()) {
 743       record_method_not_compilable(reason);
 744       return true;
 745     } else {
 746       return false;
 747     }
 748   }
 749 
 750   // Node management
 751   uint         unique() const              { return _unique; }
 752   uint         next_unique()               { return _unique++; }
 753   void         set_unique(uint i)          { _unique = i; }
 754   static int   debug_idx()                 { return debug_only(_debug_idx)+0; }
 755   static void  set_debug_idx(int i)        { debug_only(_debug_idx = i); }
 756   Arena*       node_arena()                { return &_node_arena; }
 757   Arena*       old_arena()                 { return &_old_arena; }
 758   RootNode*    root() const                { return _root; }
 759   void         set_root(RootNode* r)       { _root = r; }
 760   StartNode*   start() const;              // (Derived from root.)
 761   void         init_start(StartNode* s);
 762   Node*        immutable_memory();


src/share/vm/opto/compile.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File