Skip to content

Commit

Permalink
Disable regDepCopyRemoval when value types are enabled
Browse files Browse the repository at this point in the history
In OpenJ9, the implementation of value types does not behave well with
regDepCopyRemoval. Specifically,  the ifacmp{eq,ne} operations rely on
lowering that requires basic block splitting after GRA.
RegDepCopyRemoval currently leaves the trees in a state that the post
GRA block splitter cannot handle. So, for now, the optimization is
disabled.

eclipse-openj9/openj9#9712 was opened to track the
work to re-enable the optimization.

Unfortunately, the design of the option processing framework requires
the disabling code to be in OMR (rather than OpenJ9) and guarded
with J9_PROJECT_SPECIFIC.

Signed-off-by: Leonardo Banderali <[email protected]>
  • Loading branch information
Leonardo2718 committed May 27, 2020
1 parent 2be3cac commit 9482475
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions compiler/control/OMROptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2315,6 +2315,24 @@ OMR::Options::jitLatePostProcess(TR::OptionSet *optionSet, void * jitConfig)
fej9->waitOnCompiler(jitConfig);
}
}

// Disable regDepCopyRemoval when value types are enabled
//
// In OpenJ9, the implementation of value types does not behave well with
// regDepCopyRemoval. Specifically, the ifacmp{eq,ne} operations rely on
// lowering that requires basic block splitting after GRA.
// RegDepCopyRemoval currently leaves the trees in a state that the post
// GRA block splitter cannot handle. So, for now, the optimization is
// disabled.
//
// https://github.com/eclipse/openj9/issues/9712 was opened to track the
// work to re-enable the optimization.
//
// Unfortunately, the design of the option processing framework requires
// the disabling code to be in OMR (rather than OpenJ9) and guarded
// with J9_PROJECT_SPECIFIC.
if (TR::Compiler->om.areValueTypesEnabled())
_disabledOptimizations[regDepCopyRemoval] = true;
#endif

}
Expand Down

0 comments on commit 9482475

Please sign in to comment.