From 4d145987d94a3d2c7d2c7bf011109eba15885820 Mon Sep 17 00:00:00 2001 From: Daryl Maier Date: Fri, 18 Jun 2021 16:40:34 -0400 Subject: [PATCH] Remove obsolete long parm value profiling code Signed-off-by: Daryl Maier --- compiler/optimizer/LoopVersioner.cpp | 26 ++---------------------- compiler/optimizer/PartialRedundancy.cpp | 17 ++-------------- 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/compiler/optimizer/LoopVersioner.cpp b/compiler/optimizer/LoopVersioner.cpp index 9ca28e718a9..e50e6afebe8 100644 --- a/compiler/optimizer/LoopVersioner.cpp +++ b/compiler/optimizer/LoopVersioner.cpp @@ -3181,7 +3181,6 @@ 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() || @@ -3189,27 +3188,7 @@ void TR_LoopVersioner::updateDefinitionsAndCollectProfiledExprs(TR::Node *parent 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_ValueProfileInfoManager::getProfiledValueInfo(node, comp(), ValueInfo)); @@ -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 diff --git a/compiler/optimizer/PartialRedundancy.cpp b/compiler/optimizer/PartialRedundancy.cpp index 47455aea016..138ae7b44ea 100644 --- a/compiler/optimizer/PartialRedundancy.cpp +++ b/compiler/optimizer/PartialRedundancy.cpp @@ -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 @@ -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 ¤tOpCode = currentNode->getOpCode(); if (currentOpCode.isBranch() ||