Skip to content

Commit

Permalink
Add OMR Option to disable merging of OSR Guards
Browse files Browse the repository at this point in the history
Previously we had an environment option to disable merging of OSR guards
which was needed to allow VectorAPIExpansion to scalarize or vectorize
Vector API intrinsics on X and Z. Replacing an enviromentment option to
OMR Option to make it easier to set it for automated testing.

Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
  • Loading branch information
r30shah committed Jun 15, 2022
1 parent cf8ddbd commit 8309247
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit 8309247

Please sign in to comment.