src/share/vm/adlc/formssel.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6714694 Sdiff src/share/vm/adlc

src/share/vm/adlc/formssel.cpp

Print this page




 712       fprintf(stderr, "Warning: cannot find memory opnd in instr.\n");
 713       ((InstructForm*)this)->dump();
 714       // pretend it has multiple uses and no defs
 715       return MANY_MEMORY_OPERANDS;
 716     }
 717   }
 718 
 719   return NO_MEMORY_OPERAND;
 720 }
 721 
 722 
 723 // This instruction captures the machine-independent bottom_type
 724 // Expected use is for pointer vs oop determination for LoadP
 725 bool InstructForm::captures_bottom_type() const {
 726   if( _matrule && _matrule->_rChild &&
 727        (!strcmp(_matrule->_rChild->_opType,"CastPP")     ||  // new result type
 728         !strcmp(_matrule->_rChild->_opType,"CastX2P")    ||  // new result type
 729         !strcmp(_matrule->_rChild->_opType,"DecodeN")    ||
 730         !strcmp(_matrule->_rChild->_opType,"EncodeP")    ||
 731         !strcmp(_matrule->_rChild->_opType,"LoadN")      ||

 732         !strcmp(_matrule->_rChild->_opType,"CreateEx")   ||  // type of exception
 733         !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true;
 734   else if ( is_ideal_load() == Form::idealP )                return true;
 735   else if ( is_ideal_store() != Form::none  )                return true;
 736 
 737   return  false;
 738 }
 739 
 740 
 741 // Access instr_cost attribute or return NULL.
 742 const char* InstructForm::cost() {
 743   for (Attribute* cur = _attribs; cur != NULL; cur = (Attribute*)cur->_next) {
 744     if( strcmp(cur->_ident,AttributeForm::_ins_cost) == 0 ) {
 745       return cur->_val;
 746     }
 747   }
 748   return NULL;
 749 }
 750 
 751 // Return count of top-level operands.




 712       fprintf(stderr, "Warning: cannot find memory opnd in instr.\n");
 713       ((InstructForm*)this)->dump();
 714       // pretend it has multiple uses and no defs
 715       return MANY_MEMORY_OPERANDS;
 716     }
 717   }
 718 
 719   return NO_MEMORY_OPERAND;
 720 }
 721 
 722 
 723 // This instruction captures the machine-independent bottom_type
 724 // Expected use is for pointer vs oop determination for LoadP
 725 bool InstructForm::captures_bottom_type() const {
 726   if( _matrule && _matrule->_rChild &&
 727        (!strcmp(_matrule->_rChild->_opType,"CastPP")     ||  // new result type
 728         !strcmp(_matrule->_rChild->_opType,"CastX2P")    ||  // new result type
 729         !strcmp(_matrule->_rChild->_opType,"DecodeN")    ||
 730         !strcmp(_matrule->_rChild->_opType,"EncodeP")    ||
 731         !strcmp(_matrule->_rChild->_opType,"LoadN")      ||
 732         !strcmp(_matrule->_rChild->_opType,"LoadNKlass") ||
 733         !strcmp(_matrule->_rChild->_opType,"CreateEx")   ||  // type of exception
 734         !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true;
 735   else if ( is_ideal_load() == Form::idealP )                return true;
 736   else if ( is_ideal_store() != Form::none  )                return true;
 737 
 738   return  false;
 739 }
 740 
 741 
 742 // Access instr_cost attribute or return NULL.
 743 const char* InstructForm::cost() {
 744   for (Attribute* cur = _attribs; cur != NULL; cur = (Attribute*)cur->_next) {
 745     if( strcmp(cur->_ident,AttributeForm::_ins_cost) == 0 ) {
 746       return cur->_val;
 747     }
 748   }
 749   return NULL;
 750 }
 751 
 752 // Return count of top-level operands.


src/share/vm/adlc/formssel.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File