src/share/vm/adlc/formssel.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6857159 Cdiff src/share/vm/adlc/formssel.cpp
src/share/vm/adlc/formssel.cpp
Print this page
*** 418,427 ****
--- 418,434 ----
if( _matrule == NULL ) return Form::none;
return _matrule->is_ideal_load();
}
+ // Return 'true' if this instruction matches an ideal 'LoadKlass' node
+ bool InstructForm::skip_antidep_check() const {
+ if( _matrule == NULL ) return false;
+
+ return _matrule->skip_antidep_check();
+ }
+
// Return 'true' if this instruction matches an ideal 'Load?' node
Form::DataType InstructForm::is_ideal_store() const {
if( _matrule == NULL ) return Form::none;
return _matrule->is_ideal_store();
*** 565,574 ****
--- 572,583 ----
return rematerialize;
}
// loads from memory, so must check for anti-dependence
bool InstructForm::needs_anti_dependence_check(FormDict &globals) const {
+ if ( skip_antidep_check() ) return false;
+
// Machine independent loads must be checked for anti-dependences
if( is_ideal_load() != Form::none ) return true;
// !!!!! !!!!! !!!!!
// TEMPORARY
*** 3954,3963 ****
--- 3963,3994 ----
}
return ideal_load;
}
+
+ bool MatchRule::skip_antidep_check() const {
+ // Some loads operate on what is effectively immutable memory so we
+ // should skip the anti dep computations. For some of these nodes
+ // the rewritable field keeps the anti dep logic from triggering but
+ // for certain kinds of LoadKlass it does not since they are
+ // actually reading memory which could be rewritten by the runtime,
+ // though never by generated code. This disables it uniformly for
+ // the nodes that behave like this: LoadKlass, LoadNKlass and
+ // LoadRange.
+ if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) {
+ const char *opType = _rChild->_opType;
+ if (strcmp("LoadKlass", opType) == 0 ||
+ strcmp("LoadNKlass", opType) == 0 ||
+ strcmp("LoadRange", opType) == 0) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
Form::DataType MatchRule::is_ideal_store() const {
Form::DataType ideal_store = Form::none;
if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) {
src/share/vm/adlc/formssel.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File