3474 fprintf(fp," %s",_name); // operand 3475 } 3476 else { 3477 fprintf(fp," (%s ",_name); // " (opcodeName " 3478 if(_lChild) _lChild->output(fp); // left operand 3479 if(_rChild) _rChild->output(fp); // right operand 3480 fprintf(fp,")"); // ")" 3481 } 3482 } 3483 3484 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const { 3485 static const char *needs_ideal_memory_list[] = { 3486 "StoreI","StoreL","StoreP","StoreN","StoreNKlass","StoreD","StoreF" , 3487 "StoreB","StoreC","Store" ,"StoreFP", 3488 "LoadI", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF" , 3489 "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" , 3490 "StoreVector", "LoadVector", 3491 "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned", 3492 "LoadPLocked", 3493 "StorePConditional", "StoreIConditional", "StoreLConditional", 3494 "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP", "CompareAndSwapN", 3495 "WeakCompareAndSwapI", "WeakCompareAndSwapL", "WeakCompareAndSwapP", "WeakCompareAndSwapN", 3496 "CompareAndExchangeI", "CompareAndExchangeL", "CompareAndExchangeP", "CompareAndExchangeN", 3497 "StoreCM", 3498 "ClearArray", 3499 "GetAndAddI", "GetAndSetI", "GetAndSetP", 3500 "GetAndAddL", "GetAndSetL", "GetAndSetN", 3501 }; 3502 int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*); 3503 if( strcmp(_opType,"PrefetchAllocation")==0 ) 3504 return 1; 3505 if( _lChild ) { 3506 const char *opType = _lChild->_opType; 3507 for( int i=0; i<cnt; i++ ) 3508 if( strcmp(opType,needs_ideal_memory_list[i]) == 0 ) 3509 return 1; 3510 if( _lChild->needs_ideal_memory_edge(globals) ) 3511 return 1; 3512 } 3513 if( _rChild ) { 3514 const char *opType = _rChild->_opType; 3515 for( int i=0; i<cnt; i++ ) 3516 if( strcmp(opType,needs_ideal_memory_list[i]) == 0 ) 3517 return 1; 3518 if( _rChild->needs_ideal_memory_edge(globals) ) 3519 return 1; 3520 } | 3474 fprintf(fp," %s",_name); // operand 3475 } 3476 else { 3477 fprintf(fp," (%s ",_name); // " (opcodeName " 3478 if(_lChild) _lChild->output(fp); // left operand 3479 if(_rChild) _rChild->output(fp); // right operand 3480 fprintf(fp,")"); // ")" 3481 } 3482 } 3483 3484 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const { 3485 static const char *needs_ideal_memory_list[] = { 3486 "StoreI","StoreL","StoreP","StoreN","StoreNKlass","StoreD","StoreF" , 3487 "StoreB","StoreC","Store" ,"StoreFP", 3488 "LoadI", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF" , 3489 "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" , 3490 "StoreVector", "LoadVector", 3491 "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned", 3492 "LoadPLocked", 3493 "StorePConditional", "StoreIConditional", "StoreLConditional", 3494 "CompareAndSwapB", "CompareAndSwapS", "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP", "CompareAndSwapN", 3495 "WeakCompareAndSwapB", "WeakCompareAndSwapS", "WeakCompareAndSwapI", "WeakCompareAndSwapL", "WeakCompareAndSwapP", "WeakCompareAndSwapN", 3496 "CompareAndExchangeB", "CompareAndExchangeS", "CompareAndExchangeI", "CompareAndExchangeL", "CompareAndExchangeP", "CompareAndExchangeN", 3497 "StoreCM", 3498 "ClearArray", 3499 "GetAndSetB", "GetAndSetS", "GetAndAddI", "GetAndSetI", "GetAndSetP", 3500 "GetAndAddB", "GetAndAddS", "GetAndAddL", "GetAndSetL", "GetAndSetN", 3501 }; 3502 int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*); 3503 if( strcmp(_opType,"PrefetchAllocation")==0 ) 3504 return 1; 3505 if( _lChild ) { 3506 const char *opType = _lChild->_opType; 3507 for( int i=0; i<cnt; i++ ) 3508 if( strcmp(opType,needs_ideal_memory_list[i]) == 0 ) 3509 return 1; 3510 if( _lChild->needs_ideal_memory_edge(globals) ) 3511 return 1; 3512 } 3513 if( _rChild ) { 3514 const char *opType = _rChild->_opType; 3515 for( int i=0; i<cnt; i++ ) 3516 if( strcmp(opType,needs_ideal_memory_list[i]) == 0 ) 3517 return 1; 3518 if( _rChild->needs_ideal_memory_edge(globals) ) 3519 return 1; 3520 } |