< prev index next >

src/hotspot/share/opto/phaseX.hpp

Print this page




 408 public:
 409   PhaseGVN( Arena *arena, uint est_max_size ) : PhaseValues( arena, est_max_size ) {}
 410   PhaseGVN( PhaseGVN *gvn ) : PhaseValues( gvn ) {}
 411   PhaseGVN( PhaseGVN *gvn, const char *dummy ) : PhaseValues( gvn, dummy ) {}
 412 
 413   // Return a node which computes the same function as this node, but
 414   // in a faster or cheaper fashion.
 415   Node  *transform( Node *n );
 416   Node  *transform_no_reclaim( Node *n );
 417   virtual void record_for_igvn(Node *n) {
 418     C->record_for_igvn(n);
 419   }
 420 
 421   void replace_with(PhaseGVN* gvn) {
 422     _table.replace_with(&gvn->_table);
 423     _types = gvn->_types;
 424   }
 425 
 426   bool is_dominator(Node *d, Node *n) { return is_dominator_helper(d, n, true); }
 427 






 428   // Check for a simple dead loop when a data node references itself.
 429   DEBUG_ONLY(void dead_loop_check(Node *n);)
 430 };
 431 
 432 //------------------------------PhaseIterGVN-----------------------------------
 433 // Phase for iteratively performing local, pessimistic GVN-style optimizations.
 434 // and ideal transformations on the graph.
 435 class PhaseIterGVN : public PhaseGVN {
 436 private:
 437   bool _delay_transform;  // When true simply register the node when calling transform
 438                           // instead of actually optimizing it
 439 
 440   // Idealize old Node 'n' with respect to its inputs and its value
 441   virtual Node *transform_old( Node *a_node );
 442 
 443   // Subsume users of node 'old' into node 'nn'
 444   void subsume_node( Node *old, Node *nn );
 445 
 446   Node_Stack _stack;      // Stack used to avoid recursion
 447 




 408 public:
 409   PhaseGVN( Arena *arena, uint est_max_size ) : PhaseValues( arena, est_max_size ) {}
 410   PhaseGVN( PhaseGVN *gvn ) : PhaseValues( gvn ) {}
 411   PhaseGVN( PhaseGVN *gvn, const char *dummy ) : PhaseValues( gvn, dummy ) {}
 412 
 413   // Return a node which computes the same function as this node, but
 414   // in a faster or cheaper fashion.
 415   Node  *transform( Node *n );
 416   Node  *transform_no_reclaim( Node *n );
 417   virtual void record_for_igvn(Node *n) {
 418     C->record_for_igvn(n);
 419   }
 420 
 421   void replace_with(PhaseGVN* gvn) {
 422     _table.replace_with(&gvn->_table);
 423     _types = gvn->_types;
 424   }
 425 
 426   bool is_dominator(Node *d, Node *n) { return is_dominator_helper(d, n, true); }
 427 
 428   // Helper to call Node::Ideal() and BarrierSetC2::ideal_node().
 429   Node* apply_ideal(Node* i, bool can_reshape);
 430 
 431   // Helper to call Node::Identity() and BarrierSetC2::identity_node().
 432   Node* apply_identity(Node* n);
 433 
 434   // Check for a simple dead loop when a data node references itself.
 435   DEBUG_ONLY(void dead_loop_check(Node *n);)
 436 };
 437 
 438 //------------------------------PhaseIterGVN-----------------------------------
 439 // Phase for iteratively performing local, pessimistic GVN-style optimizations.
 440 // and ideal transformations on the graph.
 441 class PhaseIterGVN : public PhaseGVN {
 442 private:
 443   bool _delay_transform;  // When true simply register the node when calling transform
 444                           // instead of actually optimizing it
 445 
 446   // Idealize old Node 'n' with respect to its inputs and its value
 447   virtual Node *transform_old( Node *a_node );
 448 
 449   // Subsume users of node 'old' into node 'nn'
 450   void subsume_node( Node *old, Node *nn );
 451 
 452   Node_Stack _stack;      // Stack used to avoid recursion
 453 


< prev index next >