Skip to content

Commit

Permalink
Merge pull request #7108 from Spencer-Comin/guard-arraycmp
Browse files Browse the repository at this point in the history
Enable arraycmp and arraycmplen uniformly
  • Loading branch information
jdmpapin authored Nov 3, 2023
2 parents 3cdf41f + 9b37a68 commit 2a9a7f4
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 9 deletions.
4 changes: 2 additions & 2 deletions compiler/aarch64/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ OMR::ARM64::CodeGenerator::initialize()
cg->setSupportsCompactedLocals();
if (!TR::Compiler->om.canGenerateArraylets())
{
static const bool disableArrayCmp = feGetEnv("TR_aarch64DisableArrayCmp") != NULL;
static const bool disableArrayCmp = feGetEnv("TR_DisableArrayCmp") != NULL;
if (!disableArrayCmp)
{
cg->setSupportsArrayCmp();
}
static const bool disableArrayCmpLen = feGetEnv("TR_aarch64DisableArrayCmpLen") != NULL;
static const bool disableArrayCmpLen = feGetEnv("TR_DisableArrayCmpLen") != NULL;
if (!disableArrayCmpLen)
{
cg->setSupportsArrayCmpLen();
Expand Down
16 changes: 14 additions & 2 deletions compiler/p/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,20 @@ OMR::Power::CodeGenerator::initialize()
{
cg->setSupportsArraySet();
}
cg->setSupportsArrayCmp();
cg->setSupportsArrayCmpLen();

if (!TR::Compiler->om.canGenerateArraylets())
{
static const bool disableArrayCmp = feGetEnv("TR_DisableArrayCmp") != NULL;
if (!disableArrayCmp)
{
cg->setSupportsArrayCmp();
}
static const bool disableArrayCmpLen = feGetEnv("TR_DisableArrayCmpLen") != NULL;
if (!disableArrayCmpLen)
{
cg->setSupportsArrayCmpLen();
}
}

if (comp->target().cpu.supportsFeature(OMR_FEATURE_PPC_HAS_VSX))
{
Expand Down
12 changes: 10 additions & 2 deletions compiler/x/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,16 @@ OMR::X86::CodeGenerator::initializeX86(TR::Compilation *comp)

if (!TR::Compiler->om.canGenerateArraylets())
{
self()->setSupportsArrayCmp();
self()->setSupportsArrayCmpLen();
static const bool disableArrayCmp = feGetEnv("TR_DisableArrayCmp") != NULL;
if (!disableArrayCmp)
{
self()->setSupportsArrayCmp();
}
static const bool disableArrayCmpLen = feGetEnv("TR_DisableArrayCmpLen") != NULL;
if (!disableArrayCmpLen)
{
self()->setSupportsArrayCmpLen();
}
self()->setSupportsPrimitiveArrayCopy();
if (!comp->getOption(TR_DisableArraySetOpts))
{
Expand Down
17 changes: 14 additions & 3 deletions compiler/z/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,20 @@ OMR::Z::CodeGenerator::initialize()
{
cg->setSupportsArraySet();
}
cg->setSupportsArrayCmp();
cg->setSupportsArrayCmpLen();
cg->setSupportsArrayCmpSign();
if (!TR::Compiler->om.canGenerateArraylets())
{
static const bool disableArrayCmp = feGetEnv("TR_DisableArrayCmp") != NULL;
if (!disableArrayCmp)
{
cg->setSupportsArrayCmp();
cg->setSupportsArrayCmpSign();
}
static const bool disableArrayCmpLen = feGetEnv("TR_DisableArrayCmpLen") != NULL;
if (!disableArrayCmpLen)
{
cg->setSupportsArrayCmpLen();
}
}
if (!comp->compileRelocatableCode())
{
cg->setSupportsArrayTranslateTRxx();
Expand Down

0 comments on commit 2a9a7f4

Please sign in to comment.