hotspot/src/share/vm/adlc/formssel.cpp
changeset 360 21d113ecbf6a
parent 1 489c9b5090e2
child 590 2954744d7bba
child 1374 4c24294029a9
equal deleted inserted replaced
357:f4edb0d9f109 360:21d113ecbf6a
   724 // Expected use is for pointer vs oop determination for LoadP
   724 // Expected use is for pointer vs oop determination for LoadP
   725 bool InstructForm::captures_bottom_type() const {
   725 bool InstructForm::captures_bottom_type() const {
   726   if( _matrule && _matrule->_rChild &&
   726   if( _matrule && _matrule->_rChild &&
   727        (!strcmp(_matrule->_rChild->_opType,"CastPP")     ||  // new result type
   727        (!strcmp(_matrule->_rChild->_opType,"CastPP")     ||  // new result type
   728         !strcmp(_matrule->_rChild->_opType,"CastX2P")    ||  // 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")      ||
   729         !strcmp(_matrule->_rChild->_opType,"CreateEx")   ||  // type of exception
   732         !strcmp(_matrule->_rChild->_opType,"CreateEx")   ||  // type of exception
   730         !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true;
   733         !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true;
   731   else if ( is_ideal_load() == Form::idealP )                return true;
   734   else if ( is_ideal_load() == Form::idealP )                return true;
   732   else if ( is_ideal_store() != Form::none  )                return true;
   735   else if ( is_ideal_store() != Form::none  )                return true;
   733 
   736 
  2099   if (strcmp(name,"RegFlags")==0) size =  1;
  2102   if (strcmp(name,"RegFlags")==0) size =  1;
  2100   if (strcmp(name,"RegI")==0) size =  1;
  2103   if (strcmp(name,"RegI")==0) size =  1;
  2101   if (strcmp(name,"RegF")==0) size =  1;
  2104   if (strcmp(name,"RegF")==0) size =  1;
  2102   if (strcmp(name,"RegD")==0) size =  2;
  2105   if (strcmp(name,"RegD")==0) size =  2;
  2103   if (strcmp(name,"RegL")==0) size =  2;
  2106   if (strcmp(name,"RegL")==0) size =  2;
       
  2107   if (strcmp(name,"RegN")==0) size =  1;
  2104   if (strcmp(name,"RegP")==0) size =  globalAD->get_preproc_def("_LP64") ? 2 : 1;
  2108   if (strcmp(name,"RegP")==0) size =  globalAD->get_preproc_def("_LP64") ? 2 : 1;
  2105   if (size == 0) return false;
  2109   if (size == 0) return false;
  2106   return size == reg_class->size();
  2110   return size == reg_class->size();
  2107 }
  2111 }
  2108 
  2112 
  2363   }
  2367   }
  2364 }
  2368 }
  2365 
  2369 
  2366 void OperandForm::format_constant(FILE *fp, uint const_index, uint const_type) {
  2370 void OperandForm::format_constant(FILE *fp, uint const_index, uint const_type) {
  2367   switch(const_type) {
  2371   switch(const_type) {
  2368   case Form::idealI: fprintf(fp,"st->print(\"#%%d\", _c%d);\n", const_index); break;
  2372   case Form::idealI:  fprintf(fp,"st->print(\"#%%d\", _c%d);\n", const_index); break;
  2369   case Form::idealP: fprintf(fp,"_c%d->dump_on(st);\n",         const_index); break;
  2373   case Form::idealP:  fprintf(fp,"_c%d->dump_on(st);\n",         const_index); break;
  2370   case Form::idealL: fprintf(fp,"st->print(\"#%%lld\", _c%d);\n", const_index); break;
  2374   case Form::idealN:  fprintf(fp,"_c%d->dump_on(st);\n",         const_index); break;
  2371   case Form::idealF: fprintf(fp,"st->print(\"#%%f\", _c%d);\n", const_index); break;
  2375   case Form::idealL:  fprintf(fp,"st->print(\"#%%lld\", _c%d);\n", const_index); break;
  2372   case Form::idealD: fprintf(fp,"st->print(\"#%%f\", _c%d);\n", const_index); break;
  2376   case Form::idealF:  fprintf(fp,"st->print(\"#%%f\", _c%d);\n", const_index); break;
       
  2377   case Form::idealD:  fprintf(fp,"st->print(\"#%%f\", _c%d);\n", const_index); break;
  2373   default:
  2378   default:
  2374     assert( false, "ShouldNotReachHere()");
  2379     assert( false, "ShouldNotReachHere()");
  2375   }
  2380   }
  2376 }
  2381 }
  2377 
  2382 
  3298   }
  3303   }
  3299 }
  3304 }
  3300 
  3305 
  3301 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
  3306 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
  3302   static const char *needs_ideal_memory_list[] = {
  3307   static const char *needs_ideal_memory_list[] = {
  3303     "StoreI","StoreL","StoreP","StoreD","StoreF" ,
  3308     "StoreI","StoreL","StoreP","StoreN","StoreD","StoreF" ,
  3304     "StoreB","StoreC","Store" ,"StoreFP",
  3309     "StoreB","StoreC","Store" ,"StoreFP",
  3305     "LoadI" ,"LoadL", "LoadP" ,"LoadD" ,"LoadF"  ,
  3310     "LoadI" ,"LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF"  ,
  3306     "LoadB" ,"LoadC" ,"LoadS" ,"Load"   ,
  3311     "LoadB" ,"LoadC" ,"LoadS" ,"Load"   ,
  3307     "Store4I","Store2I","Store2L","Store2D","Store4F","Store2F","Store16B",
  3312     "Store4I","Store2I","Store2L","Store2D","Store4F","Store2F","Store16B",
  3308     "Store8B","Store4B","Store8C","Store4C","Store2C",
  3313     "Store8B","Store4B","Store8C","Store4C","Store2C",
  3309     "Load4I" ,"Load2I" ,"Load2L" ,"Load2D" ,"Load4F" ,"Load2F" ,"Load16B" ,
  3314     "Load4I" ,"Load2I" ,"Load2L" ,"Load2D" ,"Load4F" ,"Load2F" ,"Load16B" ,
  3310     "Load8B" ,"Load4B" ,"Load8C" ,"Load4C" ,"Load2C" ,"Load8S", "Load4S","Load2S",
  3315     "Load8B" ,"Load4B" ,"Load8C" ,"Load4C" ,"Load2C" ,"Load8S", "Load4S","Load2S",
  3311     "LoadRange", "LoadKlass", "LoadL_unaligned", "LoadD_unaligned",
  3316     "LoadRange", "LoadKlass", "LoadL_unaligned", "LoadD_unaligned",
  3312     "LoadPLocked", "LoadLLocked",
  3317     "LoadPLocked", "LoadLLocked",
  3313     "StorePConditional", "StoreLConditional",
  3318     "StorePConditional", "StoreLConditional",
  3314     "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP",
  3319     "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP", "CompareAndSwapN",
  3315     "StoreCM",
  3320     "StoreCM",
  3316     "ClearArray"
  3321     "ClearArray"
  3317   };
  3322   };
  3318   int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
  3323   int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
  3319   if( strcmp(_opType,"PrefetchRead")==0 || strcmp(_opType,"PrefetchWrite")==0 )
  3324   if( strcmp(_opType,"PrefetchRead")==0 || strcmp(_opType,"PrefetchWrite")==0 )
  3710   if (!base_operand(position, globals, result, name, opType)) {
  3715   if (!base_operand(position, globals, result, name, opType)) {
  3711     position = 0;
  3716     position = 0;
  3712     if( base_operand(position, globals, result, name, opType) &&
  3717     if( base_operand(position, globals, result, name, opType) &&
  3713         (strcmp(opType,"RegI")==0 ||
  3718         (strcmp(opType,"RegI")==0 ||
  3714          strcmp(opType,"RegP")==0 ||
  3719          strcmp(opType,"RegP")==0 ||
       
  3720          strcmp(opType,"RegN")==0 ||
  3715          strcmp(opType,"RegL")==0 ||
  3721          strcmp(opType,"RegL")==0 ||
  3716          strcmp(opType,"RegF")==0 ||
  3722          strcmp(opType,"RegF")==0 ||
  3717          strcmp(opType,"RegD")==0 ||
  3723          strcmp(opType,"RegD")==0 ||
  3718          strcmp(opType,"Reg" )==0) ) {
  3724          strcmp(opType,"Reg" )==0) ) {
  3719       return 1;
  3725       return 1;