< prev index next >

src/hotspot/share/opto/output.hpp

Print this page

 76   int                    _first_block_size;      // Size of unvalidated entry point code / OSR poison code
 77   ExceptionHandlerTable  _handler_table;         // Table of native-code exception handlers
 78   ImplicitExceptionTable _inc_table;             // Table of implicit null checks in native code
 79   C2CodeStubList          _stub_list;            // List of code stubs
 80   OopMapSet*             _oop_map_set;           // Table of oop maps (one for each safepoint location)
 81   BufferBlob*            _scratch_buffer_blob;   // For temporary code buffers.
 82   relocInfo*             _scratch_locs_memory;   // For temporary code buffers.
 83   int                    _scratch_const_size;    // For temporary code buffers.
 84   bool                   _in_scratch_emit_size;  // true when in scratch_emit_size.
 85 
 86   int                    _frame_slots;           // Size of total frame in stack slots
 87   CodeOffsets            _code_offsets;          // Offsets into the code for various interesting entries
 88 
 89   uint                   _node_bundling_limit;
 90   Bundle*                _node_bundling_base;    // Information for instruction bundling
 91 
 92   // For deopt
 93   int                    _orig_pc_slot;
 94   int                    _orig_pc_slot_offset_in_bytes;
 95 




 96   ConstantTable          _constant_table;        // The constant table for this compilation unit.
 97 
 98   BufferSizingData       _buf_sizes;
 99   Block*                 _block;
100   uint                   _index;
101 
102   void perform_mach_node_analysis();
103   void pd_perform_mach_node_analysis();
104 
105 public:
106   PhaseOutput();
107   ~PhaseOutput();
108 
109   // Convert Nodes to instruction bits and pass off to the VM
110   void Output();
111   bool need_stack_bang(int frame_size_in_bytes) const;
112   bool need_register_stack_bang() const;
113   void compute_loop_first_inst_sizes();
114 
115   void install_code(ciMethod*         target,

178   // emit to scratch blob, report resulting size
179   uint              scratch_emit_size(const Node* n);
180   void       set_in_scratch_emit_size(bool x)   {        _in_scratch_emit_size = x; }
181   bool           in_scratch_emit_size() const   { return _in_scratch_emit_size;     }
182 
183   BufferSizingData* buffer_sizing_data()        { return &_buf_sizes; }
184 
185   enum ScratchBufferBlob {
186     MAX_inst_size       = 2048,
187     MAX_locs_size       = 128, // number of relocInfo elements
188     MAX_const_size      = 128,
189     MAX_stubs_size      = 128
190   };
191 
192   int               frame_slots() const         { return _frame_slots; }
193   int               frame_size_in_words() const; // frame_slots in units of the polymorphic 'words'
194   int               frame_size_in_bytes() const { return _frame_slots << LogBytesPerInt; }
195 
196   int               bang_size_in_bytes() const;
197 


198   void          set_node_bundling_limit(uint n) { _node_bundling_limit = n; }
199   void          set_node_bundling_base(Bundle* b) { _node_bundling_base = b; }
200 
201   Bundle* node_bundling(const Node *n);
202   bool valid_bundle_info(const Node *n);
203 
204   bool starts_bundle(const Node *n) const;
205   bool contains_as_owner(GrowableArray<MonitorValue*> *monarray, ObjectValue *ov) const;
206   bool contains_as_scalarized_obj(JVMState* jvms, MachSafePointNode* sfn,
207                                   GrowableArray<ScopeValue*>* objs,
208                                   ObjectValue* ov) const;
209 
210   // Dump formatted assembly
211 #if defined(SUPPORT_OPTO_ASSEMBLY)
212   void dump_asm_on(outputStream* ost, int* pcs, uint pc_limit);
213 #else
214   void dump_asm_on(outputStream* ost, int* pcs, uint pc_limit) { return; }
215 #endif
216 
217   // Build OopMaps for each GC point

 76   int                    _first_block_size;      // Size of unvalidated entry point code / OSR poison code
 77   ExceptionHandlerTable  _handler_table;         // Table of native-code exception handlers
 78   ImplicitExceptionTable _inc_table;             // Table of implicit null checks in native code
 79   C2CodeStubList          _stub_list;            // List of code stubs
 80   OopMapSet*             _oop_map_set;           // Table of oop maps (one for each safepoint location)
 81   BufferBlob*            _scratch_buffer_blob;   // For temporary code buffers.
 82   relocInfo*             _scratch_locs_memory;   // For temporary code buffers.
 83   int                    _scratch_const_size;    // For temporary code buffers.
 84   bool                   _in_scratch_emit_size;  // true when in scratch_emit_size.
 85 
 86   int                    _frame_slots;           // Size of total frame in stack slots
 87   CodeOffsets            _code_offsets;          // Offsets into the code for various interesting entries
 88 
 89   uint                   _node_bundling_limit;
 90   Bundle*                _node_bundling_base;    // Information for instruction bundling
 91 
 92   // For deopt
 93   int                    _orig_pc_slot;
 94   int                    _orig_pc_slot_offset_in_bytes;
 95 
 96   // For GC barriers
 97   int                    _gc_barrier_save_slots;
 98   int                    _gc_barrier_save_slots_offset_in_bytes;
 99 
100   ConstantTable          _constant_table;        // The constant table for this compilation unit.
101 
102   BufferSizingData       _buf_sizes;
103   Block*                 _block;
104   uint                   _index;
105 
106   void perform_mach_node_analysis();
107   void pd_perform_mach_node_analysis();
108 
109 public:
110   PhaseOutput();
111   ~PhaseOutput();
112 
113   // Convert Nodes to instruction bits and pass off to the VM
114   void Output();
115   bool need_stack_bang(int frame_size_in_bytes) const;
116   bool need_register_stack_bang() const;
117   void compute_loop_first_inst_sizes();
118 
119   void install_code(ciMethod*         target,

182   // emit to scratch blob, report resulting size
183   uint              scratch_emit_size(const Node* n);
184   void       set_in_scratch_emit_size(bool x)   {        _in_scratch_emit_size = x; }
185   bool           in_scratch_emit_size() const   { return _in_scratch_emit_size;     }
186 
187   BufferSizingData* buffer_sizing_data()        { return &_buf_sizes; }
188 
189   enum ScratchBufferBlob {
190     MAX_inst_size       = 2048,
191     MAX_locs_size       = 128, // number of relocInfo elements
192     MAX_const_size      = 128,
193     MAX_stubs_size      = 128
194   };
195 
196   int               frame_slots() const         { return _frame_slots; }
197   int               frame_size_in_words() const; // frame_slots in units of the polymorphic 'words'
198   int               frame_size_in_bytes() const { return _frame_slots << LogBytesPerInt; }
199 
200   int               bang_size_in_bytes() const;
201 
202   int               gc_barrier_save_slots_offset_in_bytes() { return _gc_barrier_save_slots_offset_in_bytes; }
203 
204   void          set_node_bundling_limit(uint n) { _node_bundling_limit = n; }
205   void          set_node_bundling_base(Bundle* b) { _node_bundling_base = b; }
206 
207   Bundle* node_bundling(const Node *n);
208   bool valid_bundle_info(const Node *n);
209 
210   bool starts_bundle(const Node *n) const;
211   bool contains_as_owner(GrowableArray<MonitorValue*> *monarray, ObjectValue *ov) const;
212   bool contains_as_scalarized_obj(JVMState* jvms, MachSafePointNode* sfn,
213                                   GrowableArray<ScopeValue*>* objs,
214                                   ObjectValue* ov) const;
215 
216   // Dump formatted assembly
217 #if defined(SUPPORT_OPTO_ASSEMBLY)
218   void dump_asm_on(outputStream* ost, int* pcs, uint pc_limit);
219 #else
220   void dump_asm_on(outputStream* ost, int* pcs, uint pc_limit) { return; }
221 #endif
222 
223   // Build OopMaps for each GC point
< prev index next >