Skip to content

Commit

Permalink
Remove obsolete long parm value profiling code
Browse files Browse the repository at this point in the history
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
  • Loading branch information
0xdaryl committed Jun 18, 2021
1 parent b7eb963 commit 4d14598
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 39 deletions.
26 changes: 2 additions & 24 deletions compiler/optimizer/LoopVersioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3181,35 +3181,14 @@ void TR_LoopVersioner::updateDefinitionsAndCollectProfiledExprs(TR::Node *parent
_containsCall = true;
}

static char *profileLongParms = feGetEnv("TR_ProfileLongParms");
if (TR_LocalAnalysis::isSupportedOpCode(node->getOpCode(), comp()))
{
if (node->getType().isInt32() ||
(node->getType().isInt64() &&
node->getOpCode().isLoadVar() &&
node->getSymbolReference()->getSymbol()->isAutoOrParm()))
{
if (profileLongParms &&
comp()->getMethodHotness() == hot &&
comp()->getRecompilationInfo())
{
if (node->getType().isInt64())
{
if (node->getSymbolReference()->getSymbol()->isParm())
{
// Switch this compile to profiling compilation in case a
// potential opportunity is seen for specializing long parms (which are
// usually invariant) is seen
//
optimizer()->switchToProfiling();
//printf("Profiling longs in %s from LVE\n", comp()->signature());
}
}
}

if (/* comp()->getRecompilationInfo() && */ collectProfiledExprs &&
((!node->getType().isInt64()) ||
(profileLongParms /* && (valueInfo->getTopValue() == 0) */)))
if (collectProfiledExprs && !node->getType().isInt64())
{
#ifdef J9_PROJECT_SPECIFIC
TR_ValueInfo *valueInfo = static_cast<TR_ValueInfo*>(TR_ValueProfileInfoManager::getProfiledValueInfo(node, comp(), ValueInfo));
Expand All @@ -3222,8 +3201,7 @@ void TR_LoopVersioner::updateDefinitionsAndCollectProfiledExprs(TR::Node *parent
// Only collect nodes from unspecialized blocks to avoid specializing the same nodes twice
!block->isSpecialized())
{
if ((!node->getType().isInt64()) ||
(profileLongParms && (valueInfo->getTopValue() == 0)))
if (!node->getType().isInt64())
{

// Zero length contiguous array lengths mean further profiling is necessary
Expand Down
17 changes: 2 additions & 15 deletions compiler/optimizer/PartialRedundancy.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -1985,20 +1985,7 @@ bool TR_PartialRedundancy::eliminateRedundantSupportedNodes(TR::Node *parent, TR
(currentNode->getOpCodeValue() == TR::treetop))
currentNode = currentNode->getFirstChild();

static char *profileLongParms = feGetEnv("TR_ProfileLongParms");
if ((node->getType().isInt64()) &&
profileLongParms)
{
// Switch this compile to profiling comp() in case a
// potential opportunity is seen for specializing long autos is seen;
// in this case aggressively try to profile and recompile (reduced
// the profiling count)
//
if (comp()->getMethodHotness() == hot &&
comp()->getRecompilationInfo())
optimizer()->switchToProfiling();
}
else if (!node->getType().isInt64())
if (!node->getType().isInt64())
{
TR::ILOpCode &currentOpCode = currentNode->getOpCode();
if (currentOpCode.isBranch() ||
Expand Down

0 comments on commit 4d14598

Please sign in to comment.