equal
deleted
inserted
replaced
165 } |
165 } |
166 Block* successor_for_bci(int bci); |
166 Block* successor_for_bci(int bci); |
167 |
167 |
168 int start() const { return flow()->start(); } |
168 int start() const { return flow()->start(); } |
169 int limit() const { return flow()->limit(); } |
169 int limit() const { return flow()->limit(); } |
170 int pre_order() const { return flow()->pre_order(); } |
170 int rpo() const { return flow()->rpo(); } |
171 int start_sp() const { return flow()->stack_size(); } |
171 int start_sp() const { return flow()->stack_size(); } |
|
172 |
|
173 bool is_loop_head() const { return flow()->is_loop_head(); } |
|
174 bool is_SEL_head() const { return flow()->is_single_entry_loop_head(); } |
|
175 bool is_SEL_backedge(Block* pred) const{ return is_SEL_head() && pred->rpo() >= rpo(); } |
|
176 bool is_invariant_local(uint i) const { |
|
177 const JVMState* jvms = start_map()->jvms(); |
|
178 if (!jvms->is_loc(i)) return false; |
|
179 return flow()->is_invariant_local(i - jvms->locoff()); |
|
180 } |
|
181 bool can_elide_SEL_phi(uint i) const { assert(is_SEL_head(),""); return is_invariant_local(i); } |
172 |
182 |
173 const Type* peek(int off=0) const { return stack_type_at(start_sp() - (off+1)); } |
183 const Type* peek(int off=0) const { return stack_type_at(start_sp() - (off+1)); } |
174 |
184 |
175 const Type* stack_type_at(int i) const; |
185 const Type* stack_type_at(int i) const; |
176 const Type* local_type_at(int i) const; |
186 const Type* local_type_at(int i) const; |
303 int depth() const { return _depth; } |
313 int depth() const { return _depth; } |
304 const TypeFunc* tf() const { return _tf; } |
314 const TypeFunc* tf() const { return _tf; } |
305 // entry_bci() -- see osr_bci, etc. |
315 // entry_bci() -- see osr_bci, etc. |
306 |
316 |
307 ciTypeFlow* flow() const { return _flow; } |
317 ciTypeFlow* flow() const { return _flow; } |
308 // blocks() -- see pre_order_at, start_block, etc. |
318 // blocks() -- see rpo_at, start_block, etc. |
309 int block_count() const { return _block_count; } |
319 int block_count() const { return _block_count; } |
310 |
320 |
311 GraphKit& exits() { return _exits; } |
321 GraphKit& exits() { return _exits; } |
312 bool wrote_final() const { return _wrote_final; } |
322 bool wrote_final() const { return _wrote_final; } |
313 void set_wrote_final(bool z) { _wrote_final = z; } |
323 void set_wrote_final(bool z) { _wrote_final = z; } |
328 void set_parse_bci(int bci); |
338 void set_parse_bci(int bci); |
329 |
339 |
330 // Must this parse be aborted? |
340 // Must this parse be aborted? |
331 bool failing() { return C->failing(); } |
341 bool failing() { return C->failing(); } |
332 |
342 |
333 Block* pre_order_at(int po) { |
343 Block* rpo_at(int rpo) { |
334 assert(0 <= po && po < _block_count, "oob"); |
344 assert(0 <= rpo && rpo < _block_count, "oob"); |
335 return &_blocks[po]; |
345 return &_blocks[rpo]; |
336 } |
346 } |
337 Block* start_block() { |
347 Block* start_block() { |
338 return pre_order_at(flow()->start_block()->pre_order()); |
348 return rpo_at(flow()->start_block()->rpo()); |
339 } |
349 } |
340 // Can return NULL if the flow pass did not complete a block. |
350 // Can return NULL if the flow pass did not complete a block. |
341 Block* successor_for_bci(int bci) { |
351 Block* successor_for_bci(int bci) { |
342 return block()->successor_for_bci(bci); |
352 return block()->successor_for_bci(bci); |
343 } |
353 } |
356 void load_state_from(Block* b); |
366 void load_state_from(Block* b); |
357 void store_state_to(Block* b) { b->record_state(this); } |
367 void store_state_to(Block* b) { b->record_state(this); } |
358 |
368 |
359 // Parse all the basic blocks. |
369 // Parse all the basic blocks. |
360 void do_all_blocks(); |
370 void do_all_blocks(); |
361 |
|
362 // Helper for do_all_blocks; makes one pass in pre-order. |
|
363 void visit_blocks(); |
|
364 |
371 |
365 // Parse the current basic block |
372 // Parse the current basic block |
366 void do_one_block(); |
373 void do_one_block(); |
367 |
374 |
368 // Raise an error if we get a bad ciTypeFlow CFG. |
375 // Raise an error if we get a bad ciTypeFlow CFG. |