< prev index next >

src/hotspot/share/opto/compile.hpp

Print this page




  37 #include "memory/resourceArea.hpp"
  38 #include "oops/methodData.hpp"
  39 #include "opto/idealGraphPrinter.hpp"
  40 #include "opto/phasetype.hpp"
  41 #include "opto/phase.hpp"
  42 #include "opto/regmask.hpp"
  43 #include "runtime/deoptimization.hpp"
  44 #include "runtime/timerTrace.hpp"
  45 #include "runtime/vmThread.hpp"
  46 #include "utilities/ticks.hpp"
  47 
  48 class AddPNode;
  49 class Block;
  50 class Bundle;
  51 class C2Compiler;
  52 class CallGenerator;
  53 class CloneMap;
  54 class ConnectionGraph;
  55 class InlineTree;
  56 class Int_Array;

  57 class Matcher;
  58 class MachConstantNode;
  59 class MachConstantBaseNode;
  60 class MachNode;
  61 class MachOper;
  62 class MachSafePointNode;
  63 class Node;
  64 class Node_Array;
  65 class Node_Notes;
  66 class NodeCloneInfo;
  67 class OptoReg;
  68 class PhaseCFG;
  69 class PhaseGVN;
  70 class PhaseIterGVN;
  71 class PhaseRegAlloc;
  72 class PhaseCCP;
  73 class PhaseCCP_DCE;
  74 class RootNode;
  75 class relocInfo;
  76 class Scope;


 342     // Jump-table
 343     Constant  add_jump_table(MachConstantNode* n);
 344     void     fill_jump_table(CodeBuffer& cb, MachConstantNode* n, GrowableArray<Label*> labels) const;
 345   };
 346 
 347  private:
 348   // Fixed parameters to this compilation.
 349   const int             _compile_id;
 350   const bool            _save_argument_registers; // save/restore arg regs for trampolines
 351   const bool            _subsume_loads;         // Load can be matched as part of a larger op.
 352   const bool            _do_escape_analysis;    // Do escape analysis.
 353   const bool            _eliminate_boxing;      // Do boxing elimination.
 354   ciMethod*             _method;                // The method being compiled.
 355   int                   _entry_bci;             // entry bci for osr methods.
 356   const TypeFunc*       _tf;                    // My kind of signature
 357   InlineTree*           _ilt;                   // Ditto (temporary).
 358   address               _stub_function;         // VM entry for stub being compiled, or NULL
 359   const char*           _stub_name;             // Name of stub or adapter being compiled, or NULL
 360   address               _stub_entry_point;      // Compile code entry for generated stub, or NULL
 361 
 362   // For GC
 363   void*                 _barrier_set_state;
 364 
 365   // Control of this compilation.
 366   int                   _num_loop_opts;         // Number of iterations for doing loop optimiztions
 367   int                   _max_inline_size;       // Max inline size for this compilation
 368   int                   _freq_inline_size;      // Max hot method inline size for this compilation
 369   int                   _fixed_slots;           // count of frame slots not allocated by the register
 370                                                 // allocator i.e. locks, original deopt pc, etc.
 371   uintx                 _max_node_limit;        // Max unique node count during a single compilation.
 372   // For deopt
 373   int                   _orig_pc_slot;
 374   int                   _orig_pc_slot_offset_in_bytes;
 375 
 376   int                   _major_progress;        // Count of something big happening
 377   bool                  _inlining_progress;     // progress doing incremental inlining?
 378   bool                  _inlining_incrementally;// Are we doing incremental inlining (post parse)
 379   bool                  _has_loops;             // True if the method _may_ have some loops
 380   bool                  _has_split_ifs;         // True if the method _may_ have some split-if
 381   bool                  _has_unsafe_access;     // True if the method _may_ produce faults in unsafe loads or stores.
 382   bool                  _has_stringbuilder;     // True StringBuffers or StringBuilders are allocated
 383   bool                  _has_boxed_value;       // True if a boxed object is allocated
 384   bool                  _has_reserved_stack_access; // True if the method or an inlined method is annotated with ReservedStackAccess


 393   bool                  _do_count_invocations;  // True if we generate code to count invocations
 394   bool                  _do_method_data_update; // True if we generate code to update MethodData*s
 395   bool                  _do_vector_loop;        // True if allowed to execute loop in parallel iterations
 396   bool                  _use_cmove;             // True if CMove should be used without profitability analysis
 397   bool                  _age_code;              // True if we need to profile code age (decrement the aging counter)
 398   int                   _AliasLevel;            // Locally-adjusted version of AliasLevel flag.
 399   bool                  _print_assembly;        // True if we should dump assembly code for this compilation
 400   bool                  _print_inlining;        // True if we should print inlining for this compilation
 401   bool                  _print_intrinsics;      // True if we should print intrinsics for this compilation
 402 #ifndef PRODUCT
 403   bool                  _trace_opto_output;
 404   bool                  _parsed_irreducible_loop; // True if ciTypeFlow detected irreducible loops during parsing
 405 #endif
 406   bool                  _has_irreducible_loop;  // Found irreducible loops
 407   // JSR 292
 408   bool                  _has_method_handle_invokes; // True if this method has MethodHandle invokes.
 409   RTMState              _rtm_state;             // State of Restricted Transactional Memory usage
 410 
 411   // Compilation environment.
 412   Arena                 _comp_arena;            // Arena with lifetime equivalent to Compile

 413   ciEnv*                _env;                   // CI interface
 414   DirectiveSet*         _directive;             // Compiler directive
 415   CompileLog*           _log;                   // from CompilerThread
 416   const char*           _failure_reason;        // for record_failure/failing pattern
 417   GrowableArray<CallGenerator*>* _intrinsics;   // List of intrinsics.
 418   GrowableArray<Node*>* _macro_nodes;           // List of nodes which need to be expanded before matching.
 419   GrowableArray<Node*>* _predicate_opaqs;       // List of Opaque1 nodes for the loop predicates.
 420   GrowableArray<Node*>* _expensive_nodes;       // List of nodes that are expensive to compute and that we'd better not let the GVN freely common
 421   GrowableArray<Node*>* _range_check_casts;     // List of CastII nodes with a range check dependency
 422   GrowableArray<Node*>* _opaque4_nodes;         // List of Opaque4 nodes that have a default value
 423   ConnectionGraph*      _congraph;
 424 #ifndef PRODUCT
 425   IdealGraphPrinter*    _printer;
 426 #endif
 427 
 428 
 429   // Node management
 430   uint                  _unique;                // Counter for unique Node indices
 431   VectorSet             _dead_node_list;        // Set of dead nodes
 432   uint                  _dead_node_count;       // Number of dead nodes; VectorSet::Size() is O(N).




  37 #include "memory/resourceArea.hpp"
  38 #include "oops/methodData.hpp"
  39 #include "opto/idealGraphPrinter.hpp"
  40 #include "opto/phasetype.hpp"
  41 #include "opto/phase.hpp"
  42 #include "opto/regmask.hpp"
  43 #include "runtime/deoptimization.hpp"
  44 #include "runtime/timerTrace.hpp"
  45 #include "runtime/vmThread.hpp"
  46 #include "utilities/ticks.hpp"
  47 
  48 class AddPNode;
  49 class Block;
  50 class Bundle;
  51 class C2Compiler;
  52 class CallGenerator;
  53 class CloneMap;
  54 class ConnectionGraph;
  55 class InlineTree;
  56 class Int_Array;
  57 class LoadBarrierNode;
  58 class Matcher;
  59 class MachConstantNode;
  60 class MachConstantBaseNode;
  61 class MachNode;
  62 class MachOper;
  63 class MachSafePointNode;
  64 class Node;
  65 class Node_Array;
  66 class Node_Notes;
  67 class NodeCloneInfo;
  68 class OptoReg;
  69 class PhaseCFG;
  70 class PhaseGVN;
  71 class PhaseIterGVN;
  72 class PhaseRegAlloc;
  73 class PhaseCCP;
  74 class PhaseCCP_DCE;
  75 class RootNode;
  76 class relocInfo;
  77 class Scope;


 343     // Jump-table
 344     Constant  add_jump_table(MachConstantNode* n);
 345     void     fill_jump_table(CodeBuffer& cb, MachConstantNode* n, GrowableArray<Label*> labels) const;
 346   };
 347 
 348  private:
 349   // Fixed parameters to this compilation.
 350   const int             _compile_id;
 351   const bool            _save_argument_registers; // save/restore arg regs for trampolines
 352   const bool            _subsume_loads;         // Load can be matched as part of a larger op.
 353   const bool            _do_escape_analysis;    // Do escape analysis.
 354   const bool            _eliminate_boxing;      // Do boxing elimination.
 355   ciMethod*             _method;                // The method being compiled.
 356   int                   _entry_bci;             // entry bci for osr methods.
 357   const TypeFunc*       _tf;                    // My kind of signature
 358   InlineTree*           _ilt;                   // Ditto (temporary).
 359   address               _stub_function;         // VM entry for stub being compiled, or NULL
 360   const char*           _stub_name;             // Name of stub or adapter being compiled, or NULL
 361   address               _stub_entry_point;      // Compile code entry for generated stub, or NULL
 362 



 363   // Control of this compilation.
 364   int                   _num_loop_opts;         // Number of iterations for doing loop optimiztions
 365   int                   _max_inline_size;       // Max inline size for this compilation
 366   int                   _freq_inline_size;      // Max hot method inline size for this compilation
 367   int                   _fixed_slots;           // count of frame slots not allocated by the register
 368                                                 // allocator i.e. locks, original deopt pc, etc.
 369   uintx                 _max_node_limit;        // Max unique node count during a single compilation.
 370   // For deopt
 371   int                   _orig_pc_slot;
 372   int                   _orig_pc_slot_offset_in_bytes;
 373 
 374   int                   _major_progress;        // Count of something big happening
 375   bool                  _inlining_progress;     // progress doing incremental inlining?
 376   bool                  _inlining_incrementally;// Are we doing incremental inlining (post parse)
 377   bool                  _has_loops;             // True if the method _may_ have some loops
 378   bool                  _has_split_ifs;         // True if the method _may_ have some split-if
 379   bool                  _has_unsafe_access;     // True if the method _may_ produce faults in unsafe loads or stores.
 380   bool                  _has_stringbuilder;     // True StringBuffers or StringBuilders are allocated
 381   bool                  _has_boxed_value;       // True if a boxed object is allocated
 382   bool                  _has_reserved_stack_access; // True if the method or an inlined method is annotated with ReservedStackAccess


 391   bool                  _do_count_invocations;  // True if we generate code to count invocations
 392   bool                  _do_method_data_update; // True if we generate code to update MethodData*s
 393   bool                  _do_vector_loop;        // True if allowed to execute loop in parallel iterations
 394   bool                  _use_cmove;             // True if CMove should be used without profitability analysis
 395   bool                  _age_code;              // True if we need to profile code age (decrement the aging counter)
 396   int                   _AliasLevel;            // Locally-adjusted version of AliasLevel flag.
 397   bool                  _print_assembly;        // True if we should dump assembly code for this compilation
 398   bool                  _print_inlining;        // True if we should print inlining for this compilation
 399   bool                  _print_intrinsics;      // True if we should print intrinsics for this compilation
 400 #ifndef PRODUCT
 401   bool                  _trace_opto_output;
 402   bool                  _parsed_irreducible_loop; // True if ciTypeFlow detected irreducible loops during parsing
 403 #endif
 404   bool                  _has_irreducible_loop;  // Found irreducible loops
 405   // JSR 292
 406   bool                  _has_method_handle_invokes; // True if this method has MethodHandle invokes.
 407   RTMState              _rtm_state;             // State of Restricted Transactional Memory usage
 408 
 409   // Compilation environment.
 410   Arena                 _comp_arena;            // Arena with lifetime equivalent to Compile
 411   void*                 _barrier_set_state;     // Potential GC barrier state for Compile
 412   ciEnv*                _env;                   // CI interface
 413   DirectiveSet*         _directive;             // Compiler directive
 414   CompileLog*           _log;                   // from CompilerThread
 415   const char*           _failure_reason;        // for record_failure/failing pattern
 416   GrowableArray<CallGenerator*>* _intrinsics;   // List of intrinsics.
 417   GrowableArray<Node*>* _macro_nodes;           // List of nodes which need to be expanded before matching.
 418   GrowableArray<Node*>* _predicate_opaqs;       // List of Opaque1 nodes for the loop predicates.
 419   GrowableArray<Node*>* _expensive_nodes;       // List of nodes that are expensive to compute and that we'd better not let the GVN freely common
 420   GrowableArray<Node*>* _range_check_casts;     // List of CastII nodes with a range check dependency
 421   GrowableArray<Node*>* _opaque4_nodes;         // List of Opaque4 nodes that have a default value
 422   ConnectionGraph*      _congraph;
 423 #ifndef PRODUCT
 424   IdealGraphPrinter*    _printer;
 425 #endif
 426 
 427 
 428   // Node management
 429   uint                  _unique;                // Counter for unique Node indices
 430   VectorSet             _dead_node_list;        // Set of dead nodes
 431   uint                  _dead_node_count;       // Number of dead nodes; VectorSet::Size() is O(N).


< prev index next >