Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable regDepCopyRemoval when value types are enabled #5250

Merged
merged 1 commit into from
May 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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