Skip to content

Commit 883dbb9

Browse files
committed
Revert "[MemProf] Context disambiguation cloning pass [patch 1a/3]"
This reverts commit d6ad4f0. Fails to build on at least gcc 12.2: /home/npopov/repos/llvm-project/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp:482:1: error: no declaration matches ‘ContextNode<DerivedCCG, FuncTy, CallTy>* CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::getNodeForInst(const CallInfo&)’ 482 | CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::getNodeForInst( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/npopov/repos/llvm-project/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp:393:16: note: candidate is: ‘CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::ContextNode* CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::getNodeForInst(const CallInfo&)’ 393 | ContextNode *getNodeForInst(const CallInfo &C); | ^~~~~~~~~~~~~~ /home/npopov/repos/llvm-project/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp:99:7: note: ‘class CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>’ defined here 99 | class CallsiteContextGraph { | ^~~~~~~~~~~~~~~~~~~~
1 parent ed114b6 commit 883dbb9

14 files changed

+184
-3037
lines changed

llvm/include/llvm/Transforms/IPO/MemProfContextDisambiguation.h

Lines changed: 0 additions & 38 deletions
This file was deleted.

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
#include "llvm/Transforms/IPO/Internalize.h"
118118
#include "llvm/Transforms/IPO/LoopExtractor.h"
119119
#include "llvm/Transforms/IPO/LowerTypeTests.h"
120-
#include "llvm/Transforms/IPO/MemProfContextDisambiguation.h"
121120
#include "llvm/Transforms/IPO/MergeFunctions.h"
122121
#include "llvm/Transforms/IPO/ModuleInliner.h"
123122
#include "llvm/Transforms/IPO/OpenMPOpt.h"

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
#include "llvm/Transforms/IPO/InferFunctionAttrs.h"
5858
#include "llvm/Transforms/IPO/Inliner.h"
5959
#include "llvm/Transforms/IPO/LowerTypeTests.h"
60-
#include "llvm/Transforms/IPO/MemProfContextDisambiguation.h"
6160
#include "llvm/Transforms/IPO/MergeFunctions.h"
6261
#include "llvm/Transforms/IPO/ModuleInliner.h"
6362
#include "llvm/Transforms/IPO/OpenMPOpt.h"
@@ -272,10 +271,6 @@ static cl::opt<AttributorRunOption> AttributorRun(
272271
clEnumValN(AttributorRunOption::NONE, "none",
273272
"disable attributor runs")));
274273

275-
cl::opt<bool> EnableMemProfContextDisambiguation(
276-
"enable-memprof-context-disambiguation", cl::init(false), cl::Hidden,
277-
cl::ZeroOrMore, cl::desc("Enable MemProf context disambiguation"));
278-
279274
PipelineTuningOptions::PipelineTuningOptions() {
280275
LoopInterleaving = true;
281276
LoopVectorization = true;
@@ -1714,12 +1709,6 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
17141709
InlineContext{ThinOrFullLTOPhase::FullLTOPostLink,
17151710
InlinePass::CGSCCInliner}));
17161711

1717-
// Perform context disambiguation after inlining, since that would reduce the
1718-
// amount of additional cloning required to distinguish the allocation
1719-
// contexts.
1720-
if (EnableMemProfContextDisambiguation)
1721-
MPM.addPass(MemProfContextDisambiguation());
1722-
17231712
// Optimize globals again after we ran the inliner.
17241713
MPM.addPass(GlobalOptPass());
17251714

llvm/lib/Passes/PassRegistry.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ MODULE_PASS("name-anon-globals", NameAnonGlobalPass())
8787
MODULE_PASS("no-op-module", NoOpModulePass())
8888
MODULE_PASS("objc-arc-apelim", ObjCARCAPElimPass())
8989
MODULE_PASS("partial-inliner", PartialInlinerPass())
90-
MODULE_PASS("memprof-context-disambiguation", MemProfContextDisambiguation())
9190
MODULE_PASS("pgo-icall-prom", PGOIndirectCallPromotion())
9291
MODULE_PASS("pgo-instr-gen", PGOInstrumentationGen())
9392
MODULE_PASS("pgo-instr-use", PGOInstrumentationUse())

llvm/lib/Transforms/IPO/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ add_llvm_component_library(LLVMipo
2727
Internalize.cpp
2828
LoopExtractor.cpp
2929
LowerTypeTests.cpp
30-
MemProfContextDisambiguation.cpp
3130
MergeFunctions.cpp
3231
ModuleInliner.cpp
3332
OpenMPOpt.cpp

0 commit comments

Comments
 (0)