hotspot/src/share/vm/adlc/formssel.cpp
changeset 18102 5c2c46c821ba
parent 17871 6669c8d6f6b3
child 20289 35d78de0c547
equal deleted inserted replaced
18101:fdcebbc730e1 18102:5c2c46c821ba
   233   if (_matrule->find_type("Parm",index)) return true;
   233   if (_matrule->find_type("Parm",index)) return true;
   234 
   234 
   235   return false;
   235   return false;
   236 }
   236 }
   237 
   237 
       
   238 bool InstructForm::is_ideal_negD() const {
       
   239   return (_matrule && _matrule->_rChild && strcmp(_matrule->_rChild->_opType, "NegD") == 0);
       
   240 }
   238 
   241 
   239 // Return 'true' if this instruction matches an ideal 'Copy*' node
   242 // Return 'true' if this instruction matches an ideal 'Copy*' node
   240 int InstructForm::is_ideal_copy() const {
   243 int InstructForm::is_ideal_copy() const {
   241   return _matrule ? _matrule->is_ideal_copy() : 0;
   244   return _matrule ? _matrule->is_ideal_copy() : 0;
   242 }
   245 }
   530   bool   rematerialize = false;
   533   bool   rematerialize = false;
   531 
   534 
   532   Form::DataType data_type = is_chain_of_constant(globals);
   535   Form::DataType data_type = is_chain_of_constant(globals);
   533   if( data_type != Form::none )
   536   if( data_type != Form::none )
   534     rematerialize = true;
   537     rematerialize = true;
       
   538 
       
   539   // Ugly: until a better fix is implemented, disable rematerialization for
       
   540   // negD nodes because they are proved to be problematic.
       
   541   if (is_ideal_negD()) {
       
   542     return false;
       
   543   }
   535 
   544 
   536   // Constants
   545   // Constants
   537   if( _components.count() == 1 && _components[0]->is(Component::USE_DEF) )
   546   if( _components.count() == 1 && _components[0]->is(Component::USE_DEF) )
   538     rematerialize = true;
   547     rematerialize = true;
   539 
   548