Skip to content

Commit

Permalink
Merge pull request #18433 from mpirvu/idiomDisable
Browse files Browse the repository at this point in the history
Disable idiomRecognition on x86 for warm opt levels
  • Loading branch information
vijaysun-omr authored Nov 10, 2023
2 parents e4b82f2 + 50738c0 commit 881ab73
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions runtime/compiler/control/CompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9149,6 +9149,21 @@ TR::CompilationInfoPerThreadBase::wrappedCompile(J9PortLibrary *portLib, void *
{
options->setOption(TR_DisableStoreSinking);
}
// On x86, disable idiomRecognition for compilation at warm or below to save compilation time
// However, don't disable it for AOT compilations or precheckpoint or under -Xtune:throughput
if (TR::Compiler->target.cpu.isX86() &&
options->getOptLevel() <= warm &&
!vm->isAOT_DEPRECATED_DO_NOT_USE() &&
#if defined(J9VM_OPT_CRIU_SUPPORT)
!(jitConfig->javaVM->internalVMFunctions->isNonPortableRestoreMode(vmThread) &&
jitConfig->javaVM->internalVMFunctions->isCheckpointAllowed(vmThread)) &&
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
TR::Options::getAggressivityLevel() != TR::Options::TR_AggresivenessLevel::AGGRESSIVE_THROUGHPUT)
{
static char *enableIdiomRecognitionAtWarm = feGetEnv("TR_EnableIdiomRecognitionAtWarm");
if (!enableIdiomRecognitionAtWarm)
options->setDisabled(OMR::idiomRecognition, true);
}
} // end of compilation strategy tweaks for Java


Expand Down

0 comments on commit 881ab73

Please sign in to comment.