equal
deleted
inserted
replaced
418 if( _matrule == NULL ) return Form::none; |
418 if( _matrule == NULL ) return Form::none; |
419 |
419 |
420 return _matrule->is_ideal_load(); |
420 return _matrule->is_ideal_load(); |
421 } |
421 } |
422 |
422 |
|
423 // Return 'true' if this instruction matches an ideal 'LoadKlass' node |
|
424 bool InstructForm::skip_antidep_check() const { |
|
425 if( _matrule == NULL ) return false; |
|
426 |
|
427 return _matrule->skip_antidep_check(); |
|
428 } |
|
429 |
423 // Return 'true' if this instruction matches an ideal 'Load?' node |
430 // Return 'true' if this instruction matches an ideal 'Load?' node |
424 Form::DataType InstructForm::is_ideal_store() const { |
431 Form::DataType InstructForm::is_ideal_store() const { |
425 if( _matrule == NULL ) return Form::none; |
432 if( _matrule == NULL ) return Form::none; |
426 |
433 |
427 return _matrule->is_ideal_store(); |
434 return _matrule->is_ideal_store(); |
565 return rematerialize; |
572 return rematerialize; |
566 } |
573 } |
567 |
574 |
568 // loads from memory, so must check for anti-dependence |
575 // loads from memory, so must check for anti-dependence |
569 bool InstructForm::needs_anti_dependence_check(FormDict &globals) const { |
576 bool InstructForm::needs_anti_dependence_check(FormDict &globals) const { |
|
577 if ( skip_antidep_check() ) return false; |
|
578 |
570 // Machine independent loads must be checked for anti-dependences |
579 // Machine independent loads must be checked for anti-dependences |
571 if( is_ideal_load() != Form::none ) return true; |
580 if( is_ideal_load() != Form::none ) return true; |
572 |
581 |
573 // !!!!! !!!!! !!!!! |
582 // !!!!! !!!!! !!!!! |
574 // TEMPORARY |
583 // TEMPORARY |
3955 |
3964 |
3956 return ideal_load; |
3965 return ideal_load; |
3957 } |
3966 } |
3958 |
3967 |
3959 |
3968 |
|
3969 bool MatchRule::skip_antidep_check() const { |
|
3970 // Some loads operate on what is effectively immutable memory so we |
|
3971 // should skip the anti dep computations. For some of these nodes |
|
3972 // the rewritable field keeps the anti dep logic from triggering but |
|
3973 // for certain kinds of LoadKlass it does not since they are |
|
3974 // actually reading memory which could be rewritten by the runtime, |
|
3975 // though never by generated code. This disables it uniformly for |
|
3976 // the nodes that behave like this: LoadKlass, LoadNKlass and |
|
3977 // LoadRange. |
|
3978 if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) { |
|
3979 const char *opType = _rChild->_opType; |
|
3980 if (strcmp("LoadKlass", opType) == 0 || |
|
3981 strcmp("LoadNKlass", opType) == 0 || |
|
3982 strcmp("LoadRange", opType) == 0) { |
|
3983 return true; |
|
3984 } |
|
3985 } |
|
3986 |
|
3987 return false; |
|
3988 } |
|
3989 |
|
3990 |
3960 Form::DataType MatchRule::is_ideal_store() const { |
3991 Form::DataType MatchRule::is_ideal_store() const { |
3961 Form::DataType ideal_store = Form::none; |
3992 Form::DataType ideal_store = Form::none; |
3962 |
3993 |
3963 if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) { |
3994 if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) { |
3964 const char *opType = _rChild->_opType; |
3995 const char *opType = _rChild->_opType; |