< prev index next >

src/hotspot/share/adlc/formssel.cpp

Print this page

 773   if (_matrule && _matrule->_rChild &&
 774       (!strcmp(_matrule->_rChild->_opType,"CastPP")       ||  // new result type
 775        !strcmp(_matrule->_rChild->_opType,"CastDD")       ||
 776        !strcmp(_matrule->_rChild->_opType,"CastFF")       ||
 777        !strcmp(_matrule->_rChild->_opType,"CastII")       ||
 778        !strcmp(_matrule->_rChild->_opType,"CastLL")       ||
 779        !strcmp(_matrule->_rChild->_opType,"CastVV")       ||
 780        !strcmp(_matrule->_rChild->_opType,"CastX2P")      ||  // new result type
 781        !strcmp(_matrule->_rChild->_opType,"DecodeN")      ||
 782        !strcmp(_matrule->_rChild->_opType,"EncodeP")      ||
 783        !strcmp(_matrule->_rChild->_opType,"DecodeNKlass") ||
 784        !strcmp(_matrule->_rChild->_opType,"EncodePKlass") ||
 785        !strcmp(_matrule->_rChild->_opType,"LoadN")        ||
 786        !strcmp(_matrule->_rChild->_opType,"LoadNKlass")   ||
 787        !strcmp(_matrule->_rChild->_opType,"CreateEx")     ||  // type of exception
 788        !strcmp(_matrule->_rChild->_opType,"CheckCastPP")  ||
 789        !strcmp(_matrule->_rChild->_opType,"GetAndSetP")   ||
 790        !strcmp(_matrule->_rChild->_opType,"GetAndSetN")   ||
 791        !strcmp(_matrule->_rChild->_opType,"RotateLeft")   ||
 792        !strcmp(_matrule->_rChild->_opType,"RotateRight")   ||
 793 #if INCLUDE_SHENANDOAHGC
 794        !strcmp(_matrule->_rChild->_opType,"ShenandoahCompareAndExchangeP") ||
 795        !strcmp(_matrule->_rChild->_opType,"ShenandoahCompareAndExchangeN") ||
 796 #endif
 797        !strcmp(_matrule->_rChild->_opType,"StrInflatedCopy") ||
 798        !strcmp(_matrule->_rChild->_opType,"VectorCmpMasked")||
 799        !strcmp(_matrule->_rChild->_opType,"VectorMaskGen")||
 800        !strcmp(_matrule->_rChild->_opType,"VerifyVectorAlignment")||
 801        !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeP") ||
 802        !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeN"))) return true;
 803   else if ( is_ideal_load() == Form::idealP )                return true;
 804   else if ( is_ideal_store() != Form::none  )                return true;
 805 
 806   if (needs_base_oop_edge(globals)) return true;
 807 
 808   if (is_vector()) return true;
 809   if (is_mach_constant()) return true;
 810 
 811   return  false;
 812 }
 813 
 814 
 815 // Access instr_cost attribute or return null.
 816 const char* InstructForm::cost() {

3636 }
3637 
3638 void MatchNode::forms_do(FormClosure *f) {
3639   f->do_form_by_name(_name);
3640   if (_lChild) f->do_form(_lChild);
3641   if (_rChild) f->do_form(_rChild);
3642 }
3643 
3644 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
3645   static const char *needs_ideal_memory_list[] = {
3646     "StoreI","StoreL","StoreP","StoreN","StoreNKlass","StoreD","StoreF" ,
3647     "StoreB","StoreC","Store" ,"StoreFP",
3648     "LoadI", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF"  ,
3649     "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" ,
3650     "StoreVector", "LoadVector", "LoadVectorMasked", "StoreVectorMasked",
3651     "LoadVectorGather", "StoreVectorScatter", "LoadVectorGatherMasked", "StoreVectorScatterMasked",
3652     "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned",
3653     "CompareAndSwapB", "CompareAndSwapS", "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP", "CompareAndSwapN",
3654     "WeakCompareAndSwapB", "WeakCompareAndSwapS", "WeakCompareAndSwapI", "WeakCompareAndSwapL", "WeakCompareAndSwapP", "WeakCompareAndSwapN",
3655     "CompareAndExchangeB", "CompareAndExchangeS", "CompareAndExchangeI", "CompareAndExchangeL", "CompareAndExchangeP", "CompareAndExchangeN",
3656 #if INCLUDE_SHENANDOAHGC
3657     "ShenandoahCompareAndSwapN", "ShenandoahCompareAndSwapP", "ShenandoahWeakCompareAndSwapP", "ShenandoahWeakCompareAndSwapN", "ShenandoahCompareAndExchangeP", "ShenandoahCompareAndExchangeN",
3658 #endif
3659     "GetAndSetB", "GetAndSetS", "GetAndAddI", "GetAndSetI", "GetAndSetP",
3660     "GetAndAddB", "GetAndAddS", "GetAndAddL", "GetAndSetL", "GetAndSetN",
3661     "ClearArray"
3662   };
3663   int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
3664   if( strcmp(_opType,"PrefetchAllocation")==0 )
3665     return 1;
3666   if( strcmp(_opType,"CacheWB")==0 )
3667     return 1;
3668   if( strcmp(_opType,"CacheWBPreSync")==0 )
3669     return 1;
3670   if( strcmp(_opType,"CacheWBPostSync")==0 )
3671     return 1;
3672   if( _lChild ) {
3673     const char *opType = _lChild->_opType;
3674     for( int i=0; i<cnt; i++ )
3675       if( strcmp(opType,needs_ideal_memory_list[i]) == 0 )
3676         return 1;
3677     if( _lChild->needs_ideal_memory_edge(globals) )
3678       return 1;

 773   if (_matrule && _matrule->_rChild &&
 774       (!strcmp(_matrule->_rChild->_opType,"CastPP")       ||  // new result type
 775        !strcmp(_matrule->_rChild->_opType,"CastDD")       ||
 776        !strcmp(_matrule->_rChild->_opType,"CastFF")       ||
 777        !strcmp(_matrule->_rChild->_opType,"CastII")       ||
 778        !strcmp(_matrule->_rChild->_opType,"CastLL")       ||
 779        !strcmp(_matrule->_rChild->_opType,"CastVV")       ||
 780        !strcmp(_matrule->_rChild->_opType,"CastX2P")      ||  // new result type
 781        !strcmp(_matrule->_rChild->_opType,"DecodeN")      ||
 782        !strcmp(_matrule->_rChild->_opType,"EncodeP")      ||
 783        !strcmp(_matrule->_rChild->_opType,"DecodeNKlass") ||
 784        !strcmp(_matrule->_rChild->_opType,"EncodePKlass") ||
 785        !strcmp(_matrule->_rChild->_opType,"LoadN")        ||
 786        !strcmp(_matrule->_rChild->_opType,"LoadNKlass")   ||
 787        !strcmp(_matrule->_rChild->_opType,"CreateEx")     ||  // type of exception
 788        !strcmp(_matrule->_rChild->_opType,"CheckCastPP")  ||
 789        !strcmp(_matrule->_rChild->_opType,"GetAndSetP")   ||
 790        !strcmp(_matrule->_rChild->_opType,"GetAndSetN")   ||
 791        !strcmp(_matrule->_rChild->_opType,"RotateLeft")   ||
 792        !strcmp(_matrule->_rChild->_opType,"RotateRight")   ||




 793        !strcmp(_matrule->_rChild->_opType,"StrInflatedCopy") ||
 794        !strcmp(_matrule->_rChild->_opType,"VectorCmpMasked")||
 795        !strcmp(_matrule->_rChild->_opType,"VectorMaskGen")||
 796        !strcmp(_matrule->_rChild->_opType,"VerifyVectorAlignment")||
 797        !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeP") ||
 798        !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeN"))) return true;
 799   else if ( is_ideal_load() == Form::idealP )                return true;
 800   else if ( is_ideal_store() != Form::none  )                return true;
 801 
 802   if (needs_base_oop_edge(globals)) return true;
 803 
 804   if (is_vector()) return true;
 805   if (is_mach_constant()) return true;
 806 
 807   return  false;
 808 }
 809 
 810 
 811 // Access instr_cost attribute or return null.
 812 const char* InstructForm::cost() {

3632 }
3633 
3634 void MatchNode::forms_do(FormClosure *f) {
3635   f->do_form_by_name(_name);
3636   if (_lChild) f->do_form(_lChild);
3637   if (_rChild) f->do_form(_rChild);
3638 }
3639 
3640 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
3641   static const char *needs_ideal_memory_list[] = {
3642     "StoreI","StoreL","StoreP","StoreN","StoreNKlass","StoreD","StoreF" ,
3643     "StoreB","StoreC","Store" ,"StoreFP",
3644     "LoadI", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF"  ,
3645     "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" ,
3646     "StoreVector", "LoadVector", "LoadVectorMasked", "StoreVectorMasked",
3647     "LoadVectorGather", "StoreVectorScatter", "LoadVectorGatherMasked", "StoreVectorScatterMasked",
3648     "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned",
3649     "CompareAndSwapB", "CompareAndSwapS", "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP", "CompareAndSwapN",
3650     "WeakCompareAndSwapB", "WeakCompareAndSwapS", "WeakCompareAndSwapI", "WeakCompareAndSwapL", "WeakCompareAndSwapP", "WeakCompareAndSwapN",
3651     "CompareAndExchangeB", "CompareAndExchangeS", "CompareAndExchangeI", "CompareAndExchangeL", "CompareAndExchangeP", "CompareAndExchangeN",



3652     "GetAndSetB", "GetAndSetS", "GetAndAddI", "GetAndSetI", "GetAndSetP",
3653     "GetAndAddB", "GetAndAddS", "GetAndAddL", "GetAndSetL", "GetAndSetN",
3654     "ClearArray"
3655   };
3656   int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
3657   if( strcmp(_opType,"PrefetchAllocation")==0 )
3658     return 1;
3659   if( strcmp(_opType,"CacheWB")==0 )
3660     return 1;
3661   if( strcmp(_opType,"CacheWBPreSync")==0 )
3662     return 1;
3663   if( strcmp(_opType,"CacheWBPostSync")==0 )
3664     return 1;
3665   if( _lChild ) {
3666     const char *opType = _lChild->_opType;
3667     for( int i=0; i<cnt; i++ )
3668       if( strcmp(opType,needs_ideal_memory_list[i]) == 0 )
3669         return 1;
3670     if( _lChild->needs_ideal_memory_edge(globals) )
3671       return 1;
< prev index next >