hotspot/src/share/vm/opto/phaseX.cpp
changeset 360 21d113ecbf6a
parent 238 803c80713999
child 670 ddf3e9583f2f
equal deleted inserted replaced
357:f4edb0d9f109 360:21d113ecbf6a
   742 #endif
   742 #endif
   743 
   743 
   744 //=============================================================================
   744 //=============================================================================
   745 //------------------------------PhaseIterGVN-----------------------------------
   745 //------------------------------PhaseIterGVN-----------------------------------
   746 // Initialize hash table to fresh and clean for +VerifyOpto
   746 // Initialize hash table to fresh and clean for +VerifyOpto
   747 PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn, const char *dummy ) : PhaseGVN(igvn,dummy), _worklist( ) {
   747 PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn, const char *dummy ) : PhaseGVN(igvn,dummy), _worklist( ),
       
   748                                                                       _delay_transform(false) {
   748 }
   749 }
   749 
   750 
   750 //------------------------------PhaseIterGVN-----------------------------------
   751 //------------------------------PhaseIterGVN-----------------------------------
   751 // Initialize with previous PhaseIterGVN info; used by PhaseCCP
   752 // Initialize with previous PhaseIterGVN info; used by PhaseCCP
   752 PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn ) : PhaseGVN(igvn),
   753 PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn ) : PhaseGVN(igvn),
   753   _worklist( igvn->_worklist )
   754                                                    _worklist( igvn->_worklist ),
       
   755                                                    _delay_transform(igvn->_delay_transform)
   754 {
   756 {
   755 }
   757 }
   756 
   758 
   757 //------------------------------PhaseIterGVN-----------------------------------
   759 //------------------------------PhaseIterGVN-----------------------------------
   758 // Initialize with previous PhaseGVN info from Parser
   760 // Initialize with previous PhaseGVN info from Parser
   759 PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn),
   761 PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn),
   760   _worklist(*C->for_igvn())
   762                                               _worklist(*C->for_igvn()),
       
   763                                               _delay_transform(false)
   761 {
   764 {
   762   uint max;
   765   uint max;
   763 
   766 
   764   // Dead nodes in the hash table inherited from GVN were not treated as
   767   // Dead nodes in the hash table inherited from GVN were not treated as
   765   // roots during def-use info creation; hence they represent an invisible
   768   // roots during def-use info creation; hence they represent an invisible
   951 }
   954 }
   952 
   955 
   953 //------------------------------transform--------------------------------------
   956 //------------------------------transform--------------------------------------
   954 // Non-recursive: idealize Node 'n' with respect to its inputs and its value
   957 // Non-recursive: idealize Node 'n' with respect to its inputs and its value
   955 Node *PhaseIterGVN::transform( Node *n ) {
   958 Node *PhaseIterGVN::transform( Node *n ) {
       
   959   if (_delay_transform) {
       
   960     // Register the node but don't optimize for now
       
   961     register_new_node_with_optimizer(n);
       
   962     return n;
       
   963   }
       
   964 
   956   // If brand new node, make space in type array, and give it a type.
   965   // If brand new node, make space in type array, and give it a type.
   957   ensure_type_or_null(n);
   966   ensure_type_or_null(n);
   958   if (type_or_null(n) == NULL) {
   967   if (type_or_null(n) == NULL) {
   959     set_type_bottom(n);
   968     set_type_bottom(n);
   960   }
   969   }