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

src/share/vm/opto/parse.hpp

Print this page
rev 5411 : 8024069: replace_in_map() should operate on parent maps
Summary: type information gets lost because replace_in_map() doesn't update parent maps
Reviewed-by:
rev 5413 : [mq]: replaceinmapparents-cleanup


 332   bool          _wrote_final;   // Did we write a final field?
 333   bool          _count_invocations; // update and test invocation counter
 334   bool          _method_data_update; // update method data oop
 335   Node*         _alloc_with_final;   // An allocation node with final field
 336 
 337   // Variables which track Java semantics during bytecode parsing:
 338 
 339   Block*            _block;     // block currently getting parsed
 340   ciBytecodeStream  _iter;      // stream of this method's bytecodes
 341 
 342   int           _blocks_merged; // Progress meter: state merges from BB preds
 343   int           _blocks_parsed; // Progress meter: BBs actually parsed
 344 
 345   const FastLockNode* _synch_lock; // FastLockNode for synchronized method
 346 
 347 #ifndef PRODUCT
 348   int _max_switch_depth;        // Debugging SwitchRanges.
 349   int _est_switch_depth;        // Debugging SwitchRanges.
 350 #endif
 351 



 352  public:
 353   // Constructor
 354   Parse(JVMState* caller, ciMethod* parse_method, float expected_uses);
 355 
 356   virtual Parse* is_Parse() const { return (Parse*)this; }
 357 
 358  public:
 359   // Accessors.
 360   JVMState*     caller()        const { return _caller; }
 361   float         expected_uses() const { return _expected_uses; }
 362   float         prof_factor()   const { return _prof_factor; }
 363   int           depth()         const { return _depth; }
 364   const TypeFunc* tf()          const { return _tf; }
 365   //            entry_bci()     -- see osr_bci, etc.
 366 
 367   ciTypeFlow*   flow()          const { return _flow; }
 368   //            blocks()        -- see rpo_at, start_block, etc.
 369   int           block_count()   const { return _block_count; }
 370 
 371   GraphKit&     exits()               { return _exits; }
 372   bool          wrote_final() const   { return _wrote_final; }
 373   void      set_wrote_final(bool z)   { _wrote_final = z; }
 374   bool          count_invocations() const  { return _count_invocations; }
 375   bool          method_data_update() const { return _method_data_update; }
 376   Node*    alloc_with_final() const   { return _alloc_with_final; }
 377   void set_alloc_with_final(Node* n)  {
 378     assert((_alloc_with_final == NULL) || (_alloc_with_final == n), "different init objects?");


 389   bool is_normal_parse() const  { return _entry_bci == InvocationEntryBci; }
 390   bool is_osr_parse() const     { return _entry_bci != InvocationEntryBci; }
 391   int osr_bci() const           { assert(is_osr_parse(),""); return _entry_bci; }
 392 
 393   void set_parse_bci(int bci);
 394 
 395   // Must this parse be aborted?
 396   bool failing()                { return C->failing(); }
 397 
 398   Block* rpo_at(int rpo) {
 399     assert(0 <= rpo && rpo < _block_count, "oob");
 400     return &_blocks[rpo];
 401   }
 402   Block* start_block() {
 403     return rpo_at(flow()->start_block()->rpo());
 404   }
 405   // Can return NULL if the flow pass did not complete a block.
 406   Block* successor_for_bci(int bci) {
 407     return block()->successor_for_bci(bci);
 408   }


 409 
 410  private:
 411   // Create a JVMS & map for the initial state of this method.
 412   SafePointNode* create_entry_map();
 413 
 414   // OSR helpers
 415   Node *fetch_interpreter_state(int index, BasicType bt, Node *local_addrs, Node *local_addrs_base);
 416   Node* check_interpreter_type(Node* l, const Type* type, SafePointNode* &bad_type_exit);
 417   void  load_interpreter_state(Node* osr_buf);
 418 
 419   // Functions for managing basic blocks:
 420   void init_blocks();
 421   void load_state_from(Block* b);
 422   void store_state_to(Block* b) { b->record_state(this); }
 423 
 424   // Parse all the basic blocks.
 425   void do_all_blocks();
 426 
 427   // Parse the current basic block
 428   void do_one_block();




 332   bool          _wrote_final;   // Did we write a final field?
 333   bool          _count_invocations; // update and test invocation counter
 334   bool          _method_data_update; // update method data oop
 335   Node*         _alloc_with_final;   // An allocation node with final field
 336 
 337   // Variables which track Java semantics during bytecode parsing:
 338 
 339   Block*            _block;     // block currently getting parsed
 340   ciBytecodeStream  _iter;      // stream of this method's bytecodes
 341 
 342   int           _blocks_merged; // Progress meter: state merges from BB preds
 343   int           _blocks_parsed; // Progress meter: BBs actually parsed
 344 
 345   const FastLockNode* _synch_lock; // FastLockNode for synchronized method
 346 
 347 #ifndef PRODUCT
 348   int _max_switch_depth;        // Debugging SwitchRanges.
 349   int _est_switch_depth;        // Debugging SwitchRanges.
 350 #endif
 351 
 352   // parser for the caller of the method of this object
 353   Parse* const _parent;
 354 
 355  public:
 356   // Constructor
 357   Parse(JVMState* caller, ciMethod* parse_method, float expected_uses, Parse* parent);
 358 
 359   virtual Parse* is_Parse() const { return (Parse*)this; }
 360 

 361   // Accessors.
 362   JVMState*     caller()        const { return _caller; }
 363   float         expected_uses() const { return _expected_uses; }
 364   float         prof_factor()   const { return _prof_factor; }
 365   int           depth()         const { return _depth; }
 366   const TypeFunc* tf()          const { return _tf; }
 367   //            entry_bci()     -- see osr_bci, etc.
 368 
 369   ciTypeFlow*   flow()          const { return _flow; }
 370   //            blocks()        -- see rpo_at, start_block, etc.
 371   int           block_count()   const { return _block_count; }
 372 
 373   GraphKit&     exits()               { return _exits; }
 374   bool          wrote_final() const   { return _wrote_final; }
 375   void      set_wrote_final(bool z)   { _wrote_final = z; }
 376   bool          count_invocations() const  { return _count_invocations; }
 377   bool          method_data_update() const { return _method_data_update; }
 378   Node*    alloc_with_final() const   { return _alloc_with_final; }
 379   void set_alloc_with_final(Node* n)  {
 380     assert((_alloc_with_final == NULL) || (_alloc_with_final == n), "different init objects?");


 391   bool is_normal_parse() const  { return _entry_bci == InvocationEntryBci; }
 392   bool is_osr_parse() const     { return _entry_bci != InvocationEntryBci; }
 393   int osr_bci() const           { assert(is_osr_parse(),""); return _entry_bci; }
 394 
 395   void set_parse_bci(int bci);
 396 
 397   // Must this parse be aborted?
 398   bool failing()                { return C->failing(); }
 399 
 400   Block* rpo_at(int rpo) {
 401     assert(0 <= rpo && rpo < _block_count, "oob");
 402     return &_blocks[rpo];
 403   }
 404   Block* start_block() {
 405     return rpo_at(flow()->start_block()->rpo());
 406   }
 407   // Can return NULL if the flow pass did not complete a block.
 408   Block* successor_for_bci(int bci) {
 409     return block()->successor_for_bci(bci);
 410   }
 411 
 412   virtual Parse* parent_parser() const { return _parent; }
 413 
 414  private:
 415   // Create a JVMS & map for the initial state of this method.
 416   SafePointNode* create_entry_map();
 417 
 418   // OSR helpers
 419   Node *fetch_interpreter_state(int index, BasicType bt, Node *local_addrs, Node *local_addrs_base);
 420   Node* check_interpreter_type(Node* l, const Type* type, SafePointNode* &bad_type_exit);
 421   void  load_interpreter_state(Node* osr_buf);
 422 
 423   // Functions for managing basic blocks:
 424   void init_blocks();
 425   void load_state_from(Block* b);
 426   void store_state_to(Block* b) { b->record_state(this); }
 427 
 428   // Parse all the basic blocks.
 429   void do_all_blocks();
 430 
 431   // Parse the current basic block
 432   void do_one_block();


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