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

src/share/vm/adlc/formssel.cpp

Print this page


   1 /*
   2  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 415 Form::DataType InstructForm::is_ideal_load() const {
 416   if( _matrule == NULL ) return Form::none;
 417 
 418   return  _matrule->is_ideal_load();
 419 }
 420 
 421 // Return 'true' if this instruction matches an ideal 'LoadKlass' node
 422 bool InstructForm::skip_antidep_check() const {
 423   if( _matrule == NULL ) return false;
 424 
 425   return  _matrule->skip_antidep_check();
 426 }
 427 
 428 // Return 'true' if this instruction matches an ideal 'Load?' node
 429 Form::DataType InstructForm::is_ideal_store() const {
 430   if( _matrule == NULL ) return Form::none;
 431 
 432   return  _matrule->is_ideal_store();
 433 }
 434 








 435 // Return the input register that must match the output register
 436 // If this is not required, return 0
 437 uint InstructForm::two_address(FormDict &globals) {
 438   uint  matching_input = 0;
 439   if(_components.count() == 0) return 0;
 440 
 441   _components.reset();
 442   Component *comp = _components.iter();
 443   // Check if there is a DEF
 444   if( comp->isa(Component::DEF) ) {
 445     // Check that this is a register
 446     const char  *def_type = comp->_type;
 447     const Form  *form     = globals[def_type];
 448     OperandForm *op       = form->is_operand();
 449     if( op ) {
 450       if( op->constrained_reg_class() != NULL &&
 451           op->interface_type(globals) == Form::register_interface ) {
 452         // Remember the local name for equality test later
 453         const char *def_name = comp->_name;
 454         // Check if a component has the same name and is a USE


 734 }
 735 
 736 
 737 // This instruction captures the machine-independent bottom_type
 738 // Expected use is for pointer vs oop determination for LoadP
 739 bool InstructForm::captures_bottom_type(FormDict &globals) const {
 740   if( _matrule && _matrule->_rChild &&
 741        (!strcmp(_matrule->_rChild->_opType,"CastPP")     ||  // new result type
 742         !strcmp(_matrule->_rChild->_opType,"CastX2P")    ||  // new result type
 743         !strcmp(_matrule->_rChild->_opType,"DecodeN")    ||
 744         !strcmp(_matrule->_rChild->_opType,"EncodeP")    ||
 745         !strcmp(_matrule->_rChild->_opType,"LoadN")      ||
 746         !strcmp(_matrule->_rChild->_opType,"LoadNKlass") ||
 747         !strcmp(_matrule->_rChild->_opType,"CreateEx")   ||  // type of exception
 748         !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true;
 749   else if ( is_ideal_load() == Form::idealP )                return true;
 750   else if ( is_ideal_store() != Form::none  )                return true;
 751 
 752   if (needs_base_oop_edge(globals)) return true;
 753 



 754   return  false;
 755 }
 756 
 757 
 758 // Access instr_cost attribute or return NULL.
 759 const char* InstructForm::cost() {
 760   for (Attribute* cur = _attribs; cur != NULL; cur = (Attribute*)cur->_next) {
 761     if( strcmp(cur->_ident,AttributeForm::_ins_cost) == 0 ) {
 762       return cur->_val;
 763     }
 764   }
 765   return NULL;
 766 }
 767 
 768 // Return count of top-level operands.
 769 uint InstructForm::num_opnds() {
 770   int  num_opnds = _components.num_operands();
 771 
 772   // Need special handling for matching some ideal nodes
 773   // i.e. Matching a return node


3365 }
3366 
3367 void MatchNode::output(FILE *fp) {
3368   if (_lChild==0 && _rChild==0) {
3369     fprintf(fp," %s",_name);    // operand
3370   }
3371   else {
3372     fprintf(fp," (%s ",_name);  // " (opcodeName "
3373     if(_lChild) _lChild->output(fp); //               left operand
3374     if(_rChild) _rChild->output(fp); //                    right operand
3375     fprintf(fp,")");                 //                                 ")"
3376   }
3377 }
3378 
3379 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
3380   static const char *needs_ideal_memory_list[] = {
3381     "StoreI","StoreL","StoreP","StoreN","StoreD","StoreF" ,
3382     "StoreB","StoreC","Store" ,"StoreFP",
3383     "LoadI", "LoadUI2L", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF"  ,
3384     "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load"   ,
3385     "Store4I","Store2I","Store2L","Store2D","Store4F","Store2F","Store16B",
3386     "Store8B","Store4B","Store8C","Store4C","Store2C",
3387     "Load4I" ,"Load2I" ,"Load2L" ,"Load2D" ,"Load4F" ,"Load2F" ,"Load16B" ,
3388     "Load8B" ,"Load4B" ,"Load8C" ,"Load4C" ,"Load2C" ,"Load8S", "Load4S","Load2S",
3389     "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned",
3390     "LoadPLocked", "LoadLLocked",
3391     "StorePConditional", "StoreIConditional", "StoreLConditional",
3392     "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP", "CompareAndSwapN",
3393     "StoreCM",
3394     "ClearArray"
3395   };
3396   int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
3397   if( strcmp(_opType,"PrefetchRead")==0 ||
3398       strcmp(_opType,"PrefetchWrite")==0 ||
3399       strcmp(_opType,"PrefetchAllocation")==0 )
3400     return 1;
3401   if( _lChild ) {
3402     const char *opType = _lChild->_opType;
3403     for( int i=0; i<cnt; i++ )
3404       if( strcmp(opType,needs_ideal_memory_list[i]) == 0 )
3405         return 1;
3406     if( _lChild->needs_ideal_memory_edge(globals) )
3407       return 1;
3408   }


3805   uint position = position0;
3806 
3807   return (MatchNode::base_operand( position, globals, result, name, opType));
3808 }
3809 
3810 
3811 bool MatchRule::is_base_register(FormDict &globals) const {
3812   uint   position = 1;
3813   const char  *result   = NULL;
3814   const char  *name     = NULL;
3815   const char  *opType   = NULL;
3816   if (!base_operand(position, globals, result, name, opType)) {
3817     position = 0;
3818     if( base_operand(position, globals, result, name, opType) &&
3819         (strcmp(opType,"RegI")==0 ||
3820          strcmp(opType,"RegP")==0 ||
3821          strcmp(opType,"RegN")==0 ||
3822          strcmp(opType,"RegL")==0 ||
3823          strcmp(opType,"RegF")==0 ||
3824          strcmp(opType,"RegD")==0 ||




3825          strcmp(opType,"Reg" )==0) ) {
3826       return 1;
3827     }
3828   }
3829   return 0;
3830 }
3831 
3832 Form::DataType MatchRule::is_base_constant(FormDict &globals) const {
3833   uint         position = 1;
3834   const char  *result   = NULL;
3835   const char  *name     = NULL;
3836   const char  *opType   = NULL;
3837   if (!base_operand(position, globals, result, name, opType)) {
3838     position = 0;
3839     if (base_operand(position, globals, result, name, opType)) {
3840       return ideal_to_const_type(opType);
3841     }
3842   }
3843   return Form::none;
3844 }


3921         strcmp(opType,"ConvD2F")==0 ||
3922         strcmp(opType,"ConvD2I")==0 ||
3923         strcmp(opType,"ConvD2L")==0 ||
3924         strcmp(opType,"ConvF2D")==0 ||
3925         strcmp(opType,"ConvF2I")==0 ||
3926         strcmp(opType,"ConvF2L")==0 ||
3927         strcmp(opType,"ConvI2D")==0 ||
3928         strcmp(opType,"ConvI2F")==0 ||
3929         strcmp(opType,"ConvI2L")==0 ||
3930         strcmp(opType,"ConvL2D")==0 ||
3931         strcmp(opType,"ConvL2F")==0 ||
3932         strcmp(opType,"ConvL2I")==0 ||
3933         strcmp(opType,"DecodeN")==0 ||
3934         strcmp(opType,"EncodeP")==0 ||
3935         strcmp(opType,"RoundDouble")==0 ||
3936         strcmp(opType,"RoundFloat")==0 ||
3937         strcmp(opType,"ReverseBytesI")==0 ||
3938         strcmp(opType,"ReverseBytesL")==0 ||
3939         strcmp(opType,"ReverseBytesUS")==0 ||
3940         strcmp(opType,"ReverseBytesS")==0 ||
3941         strcmp(opType,"Replicate16B")==0 ||
3942         strcmp(opType,"Replicate8B")==0 ||
3943         strcmp(opType,"Replicate4B")==0 ||
3944         strcmp(opType,"Replicate8C")==0 ||
3945         strcmp(opType,"Replicate4C")==0 ||
3946         strcmp(opType,"Replicate8S")==0 ||
3947         strcmp(opType,"Replicate4S")==0 ||
3948         strcmp(opType,"Replicate4I")==0 ||
3949         strcmp(opType,"Replicate2I")==0 ||
3950         strcmp(opType,"Replicate2L")==0 ||
3951         strcmp(opType,"Replicate4F")==0 ||
3952         strcmp(opType,"Replicate2F")==0 ||
3953         strcmp(opType,"Replicate2D")==0 ||
3954         0 /* 0 to line up columns nicely */ )
3955       return 1;
3956   }
3957   return 0;
3958 }
3959 
3960 bool MatchRule::is_ideal_if() const {
3961   if( !_opType ) return false;
3962   return
3963     !strcmp(_opType,"If"            ) ||
3964     !strcmp(_opType,"CountedLoopEnd");
3965 }
3966 
3967 bool MatchRule::is_ideal_fastlock() const {
3968   if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) {
3969     return (strcmp(_rChild->_opType,"FastLock") == 0);
3970   }
3971   return false;
3972 }
3973 


4017 bool MatchRule::is_ideal_bool() const {
4018   if( _opType ) {
4019     if( !strcmp(_opType,"Bool") )
4020       return true;
4021   }
4022   return false;
4023 }
4024 
4025 
4026 Form::DataType MatchRule::is_ideal_load() const {
4027   Form::DataType ideal_load = Form::none;
4028 
4029   if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) {
4030     const char *opType = _rChild->_opType;
4031     ideal_load = is_load_from_memory(opType);
4032   }
4033 
4034   return ideal_load;
4035 }
4036 

















4037 
4038 bool MatchRule::skip_antidep_check() const {
4039   // Some loads operate on what is effectively immutable memory so we
4040   // should skip the anti dep computations.  For some of these nodes
4041   // the rewritable field keeps the anti dep logic from triggering but
4042   // for certain kinds of LoadKlass it does not since they are
4043   // actually reading memory which could be rewritten by the runtime,
4044   // though never by generated code.  This disables it uniformly for
4045   // the nodes that behave like this: LoadKlass, LoadNKlass and
4046   // LoadRange.
4047   if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) {
4048     const char *opType = _rChild->_opType;
4049     if (strcmp("LoadKlass", opType) == 0 ||
4050         strcmp("LoadNKlass", opType) == 0 ||
4051         strcmp("LoadRange", opType) == 0) {
4052       return true;
4053     }
4054   }
4055 
4056   return false;


   1 /*
   2  * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 415 Form::DataType InstructForm::is_ideal_load() const {
 416   if( _matrule == NULL ) return Form::none;
 417 
 418   return  _matrule->is_ideal_load();
 419 }
 420 
 421 // Return 'true' if this instruction matches an ideal 'LoadKlass' node
 422 bool InstructForm::skip_antidep_check() const {
 423   if( _matrule == NULL ) return false;
 424 
 425   return  _matrule->skip_antidep_check();
 426 }
 427 
 428 // Return 'true' if this instruction matches an ideal 'Load?' node
 429 Form::DataType InstructForm::is_ideal_store() const {
 430   if( _matrule == NULL ) return Form::none;
 431 
 432   return  _matrule->is_ideal_store();
 433 }
 434 
 435 // Return 'true' if this instruction matches an ideal vector node
 436 bool InstructForm::is_vector() const {
 437   if( _matrule == NULL ) return false;
 438 
 439   return _matrule->is_vector();
 440 }
 441 
 442 
 443 // Return the input register that must match the output register
 444 // If this is not required, return 0
 445 uint InstructForm::two_address(FormDict &globals) {
 446   uint  matching_input = 0;
 447   if(_components.count() == 0) return 0;
 448 
 449   _components.reset();
 450   Component *comp = _components.iter();
 451   // Check if there is a DEF
 452   if( comp->isa(Component::DEF) ) {
 453     // Check that this is a register
 454     const char  *def_type = comp->_type;
 455     const Form  *form     = globals[def_type];
 456     OperandForm *op       = form->is_operand();
 457     if( op ) {
 458       if( op->constrained_reg_class() != NULL &&
 459           op->interface_type(globals) == Form::register_interface ) {
 460         // Remember the local name for equality test later
 461         const char *def_name = comp->_name;
 462         // Check if a component has the same name and is a USE


 742 }
 743 
 744 
 745 // This instruction captures the machine-independent bottom_type
 746 // Expected use is for pointer vs oop determination for LoadP
 747 bool InstructForm::captures_bottom_type(FormDict &globals) const {
 748   if( _matrule && _matrule->_rChild &&
 749        (!strcmp(_matrule->_rChild->_opType,"CastPP")     ||  // new result type
 750         !strcmp(_matrule->_rChild->_opType,"CastX2P")    ||  // new result type
 751         !strcmp(_matrule->_rChild->_opType,"DecodeN")    ||
 752         !strcmp(_matrule->_rChild->_opType,"EncodeP")    ||
 753         !strcmp(_matrule->_rChild->_opType,"LoadN")      ||
 754         !strcmp(_matrule->_rChild->_opType,"LoadNKlass") ||
 755         !strcmp(_matrule->_rChild->_opType,"CreateEx")   ||  // type of exception
 756         !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true;
 757   else if ( is_ideal_load() == Form::idealP )                return true;
 758   else if ( is_ideal_store() != Form::none  )                return true;
 759 
 760   if (needs_base_oop_edge(globals)) return true;
 761 
 762   if (is_vector()) return true;
 763   if (is_mach_constant()) return true;
 764 
 765   return  false;
 766 }
 767 
 768 
 769 // Access instr_cost attribute or return NULL.
 770 const char* InstructForm::cost() {
 771   for (Attribute* cur = _attribs; cur != NULL; cur = (Attribute*)cur->_next) {
 772     if( strcmp(cur->_ident,AttributeForm::_ins_cost) == 0 ) {
 773       return cur->_val;
 774     }
 775   }
 776   return NULL;
 777 }
 778 
 779 // Return count of top-level operands.
 780 uint InstructForm::num_opnds() {
 781   int  num_opnds = _components.num_operands();
 782 
 783   // Need special handling for matching some ideal nodes
 784   // i.e. Matching a return node


3376 }
3377 
3378 void MatchNode::output(FILE *fp) {
3379   if (_lChild==0 && _rChild==0) {
3380     fprintf(fp," %s",_name);    // operand
3381   }
3382   else {
3383     fprintf(fp," (%s ",_name);  // " (opcodeName "
3384     if(_lChild) _lChild->output(fp); //               left operand
3385     if(_rChild) _rChild->output(fp); //                    right operand
3386     fprintf(fp,")");                 //                                 ")"
3387   }
3388 }
3389 
3390 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
3391   static const char *needs_ideal_memory_list[] = {
3392     "StoreI","StoreL","StoreP","StoreN","StoreD","StoreF" ,
3393     "StoreB","StoreC","Store" ,"StoreFP",
3394     "LoadI", "LoadUI2L", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF"  ,
3395     "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" ,
3396     "StoreVector", "LoadVector",



3397     "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned",
3398     "LoadPLocked", "LoadLLocked",
3399     "StorePConditional", "StoreIConditional", "StoreLConditional",
3400     "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP", "CompareAndSwapN",
3401     "StoreCM",
3402     "ClearArray"
3403   };
3404   int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
3405   if( strcmp(_opType,"PrefetchRead")==0 ||
3406       strcmp(_opType,"PrefetchWrite")==0 ||
3407       strcmp(_opType,"PrefetchAllocation")==0 )
3408     return 1;
3409   if( _lChild ) {
3410     const char *opType = _lChild->_opType;
3411     for( int i=0; i<cnt; i++ )
3412       if( strcmp(opType,needs_ideal_memory_list[i]) == 0 )
3413         return 1;
3414     if( _lChild->needs_ideal_memory_edge(globals) )
3415       return 1;
3416   }


3813   uint position = position0;
3814 
3815   return (MatchNode::base_operand( position, globals, result, name, opType));
3816 }
3817 
3818 
3819 bool MatchRule::is_base_register(FormDict &globals) const {
3820   uint   position = 1;
3821   const char  *result   = NULL;
3822   const char  *name     = NULL;
3823   const char  *opType   = NULL;
3824   if (!base_operand(position, globals, result, name, opType)) {
3825     position = 0;
3826     if( base_operand(position, globals, result, name, opType) &&
3827         (strcmp(opType,"RegI")==0 ||
3828          strcmp(opType,"RegP")==0 ||
3829          strcmp(opType,"RegN")==0 ||
3830          strcmp(opType,"RegL")==0 ||
3831          strcmp(opType,"RegF")==0 ||
3832          strcmp(opType,"RegD")==0 ||
3833          strcmp(opType,"VecS")==0 ||
3834          strcmp(opType,"VecD")==0 ||
3835          strcmp(opType,"VecX")==0 ||
3836          strcmp(opType,"VecY")==0 ||
3837          strcmp(opType,"Reg" )==0) ) {
3838       return 1;
3839     }
3840   }
3841   return 0;
3842 }
3843 
3844 Form::DataType MatchRule::is_base_constant(FormDict &globals) const {
3845   uint         position = 1;
3846   const char  *result   = NULL;
3847   const char  *name     = NULL;
3848   const char  *opType   = NULL;
3849   if (!base_operand(position, globals, result, name, opType)) {
3850     position = 0;
3851     if (base_operand(position, globals, result, name, opType)) {
3852       return ideal_to_const_type(opType);
3853     }
3854   }
3855   return Form::none;
3856 }


3933         strcmp(opType,"ConvD2F")==0 ||
3934         strcmp(opType,"ConvD2I")==0 ||
3935         strcmp(opType,"ConvD2L")==0 ||
3936         strcmp(opType,"ConvF2D")==0 ||
3937         strcmp(opType,"ConvF2I")==0 ||
3938         strcmp(opType,"ConvF2L")==0 ||
3939         strcmp(opType,"ConvI2D")==0 ||
3940         strcmp(opType,"ConvI2F")==0 ||
3941         strcmp(opType,"ConvI2L")==0 ||
3942         strcmp(opType,"ConvL2D")==0 ||
3943         strcmp(opType,"ConvL2F")==0 ||
3944         strcmp(opType,"ConvL2I")==0 ||
3945         strcmp(opType,"DecodeN")==0 ||
3946         strcmp(opType,"EncodeP")==0 ||
3947         strcmp(opType,"RoundDouble")==0 ||
3948         strcmp(opType,"RoundFloat")==0 ||
3949         strcmp(opType,"ReverseBytesI")==0 ||
3950         strcmp(opType,"ReverseBytesL")==0 ||
3951         strcmp(opType,"ReverseBytesUS")==0 ||
3952         strcmp(opType,"ReverseBytesS")==0 ||
3953         strcmp(opType,"ReplicateB")==0 ||
3954         strcmp(opType,"ReplicateC")==0 ||
3955         strcmp(opType,"ReplicateS")==0 ||
3956         strcmp(opType,"ReplicateI")==0 ||
3957         strcmp(opType,"ReplicateL")==0 ||
3958         strcmp(opType,"ReplicateF")==0 ||
3959         strcmp(opType,"ReplicateD")==0 ||






3960         0 /* 0 to line up columns nicely */ )
3961       return 1;
3962   }
3963   return 0;
3964 }
3965 
3966 bool MatchRule::is_ideal_if() const {
3967   if( !_opType ) return false;
3968   return
3969     !strcmp(_opType,"If"            ) ||
3970     !strcmp(_opType,"CountedLoopEnd");
3971 }
3972 
3973 bool MatchRule::is_ideal_fastlock() const {
3974   if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) {
3975     return (strcmp(_rChild->_opType,"FastLock") == 0);
3976   }
3977   return false;
3978 }
3979 


4023 bool MatchRule::is_ideal_bool() const {
4024   if( _opType ) {
4025     if( !strcmp(_opType,"Bool") )
4026       return true;
4027   }
4028   return false;
4029 }
4030 
4031 
4032 Form::DataType MatchRule::is_ideal_load() const {
4033   Form::DataType ideal_load = Form::none;
4034 
4035   if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) {
4036     const char *opType = _rChild->_opType;
4037     ideal_load = is_load_from_memory(opType);
4038   }
4039 
4040   return ideal_load;
4041 }
4042 
4043 bool MatchRule::is_vector() const {
4044   if( _rChild ) {
4045     const char  *opType = _rChild->_opType;
4046     if( strcmp(opType,"ReplicateB")==0 ||
4047         strcmp(opType,"ReplicateC")==0 ||
4048         strcmp(opType,"ReplicateS")==0 ||
4049         strcmp(opType,"ReplicateI")==0 ||
4050         strcmp(opType,"ReplicateL")==0 ||
4051         strcmp(opType,"ReplicateF")==0 ||
4052         strcmp(opType,"LoadVector")==0 ||
4053         strcmp(opType,"StoreVector")==0 ||
4054         0 /* 0 to line up columns nicely */ )
4055       return true;
4056   }
4057   return false;
4058 }
4059 
4060 
4061 bool MatchRule::skip_antidep_check() const {
4062   // Some loads operate on what is effectively immutable memory so we
4063   // should skip the anti dep computations.  For some of these nodes
4064   // the rewritable field keeps the anti dep logic from triggering but
4065   // for certain kinds of LoadKlass it does not since they are
4066   // actually reading memory which could be rewritten by the runtime,
4067   // though never by generated code.  This disables it uniformly for
4068   // the nodes that behave like this: LoadKlass, LoadNKlass and
4069   // LoadRange.
4070   if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) {
4071     const char *opType = _rChild->_opType;
4072     if (strcmp("LoadKlass", opType) == 0 ||
4073         strcmp("LoadNKlass", opType) == 0 ||
4074         strcmp("LoadRange", opType) == 0) {
4075       return true;
4076     }
4077   }
4078 
4079   return false;


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