comparison src/share/vm/adlc/formssel.cpp @ 11002:7fa25f5575c9

8016157: During CTW: C2: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block Summary: Disable rematerialization for negD node Reviewed-by: kvn, roland
author adlertz
date Fri, 14 Jun 2013 01:19:56 +0200
parents f15fe46d8c00
children c9ccd7b85f20
comparison
equal deleted inserted replaced
11001:c52abc8a0b08 11002:7fa25f5575c9
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