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

Add OMR Option to disable merging of OSR Guards #6563

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions compiler/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,8 +1213,7 @@ OMR::CodeGenerator::isGlobalVRF(TR_GlobalRegisterNumber n)
bool
OMR::CodeGenerator::supportsMergingGuards()
{
static bool enableMergingGuards = feGetEnv("TR_DisableMergingGuards") == NULL;
return enableMergingGuards &&
return !self()->comp()->getOption(TR_DisableOSRGuardMerging) &&
self()->getSupportsVirtualGuardNOPing() &&
self()->comp()->performVirtualGuardNOPing() &&
!self()->comp()->compileRelocatableCode();
Expand Down
1 change: 1 addition & 0 deletions compiler/control/OMROptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ TR::OptionTable OMR::Options::_jitOptions[] = {
{"disableOSR", "O\tdisable support for on-stack replacement", SET_OPTION_BIT(TR_DisableOSR), "F"},
{"disableOSRCallSiteRemat", "O\tdisable use of the call stack remat table in on-stack replacement", SET_OPTION_BIT(TR_DisableOSRCallSiteRemat), "F"},
{"disableOSRExceptionEdgeRemoval", "O\tdon't trim away unused on-stack replacement points", TR::Options::disableOptimization, osrExceptionEdgeRemoval, 0, "P"},
{"disableOSRGuardMerging", "O\tdisable Merging of OSR guards", SET_OPTION_BIT(TR_DisableOSRGuardMerging), "F"},
#ifdef J9_PROJECT_SPECIFIC
{"disableOSRGuardRemoval", "O\tdisable OSR guard removal", TR::Options::disableOptimization, osrGuardRemoval, 0, "P"},
#endif
Expand Down
2 changes: 1 addition & 1 deletion compiler/control/OMROptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ enum TR_CompilationOptions
TR_DoNotUsePersistentIprofiler = 0x00080000 + 15,
TR_DoNotUseFastStackwalk = 0x00100000 + 15,
TR_DisableOSRLiveRangeAnalysis = 0x00200000 + 15,
// Available = 0x00400000 + 15,
TR_DisableOSRGuardMerging = 0x00400000 + 15,
// Available = 0x00800000 + 15,
// Available = 0x01000000 + 15,
// Available = 0x02000000 + 15,
Expand Down