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 13, 2022
1 parent cf8ddbd commit 187fb9a
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_DisableOSRGuardsMerging) &&
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 @@ -475,6 +475,7 @@ TR::OptionTable OMR::Options::_jitOptions[] = {
#ifdef J9_PROJECT_SPECIFIC
{"disableOSRGuardRemoval", "O\tdisable OSR guard removal", TR::Options::disableOptimization, osrGuardRemoval, 0, "P"},
#endif
{"disableOSRGuardsMerging", "O\tdisable Merging of OSR guards", SET_OPTION_BIT(TR_DisableOSRGuardsMerging), "F"},
{"disableOSRLiveRangeAnalysis", "O\tdisable live range analysis for on-stack replacement", SET_OPTION_BIT(TR_DisableOSRLiveRangeAnalysis), "F"},
{"disableOSRLocalRemat", "O\tdisable use of remat when inserting guards for on-stack replacement", SET_OPTION_BIT(TR_DisableOSRLocalRemat), "F"},
{"disableOSRSharedSlots", "O\tdisable support for shared slots in on-stack replacement", SET_OPTION_BIT(TR_DisableOSRSharedSlots), "F"},
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_DisableOSRGuardsMerging = 0x00400000 + 15,
// Available = 0x00800000 + 15,
// Available = 0x01000000 + 15,
// Available = 0x02000000 + 15,
Expand Down

0 comments on commit 187fb9a

Please sign in to comment.