aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/opt
diff options
context:
space:
mode:
authorJP Lehr <JanPatrick.Lehr@amd.com>2023-07-11 05:29:41 -0400
committerJP Lehr <JanPatrick.Lehr@amd.com>2023-07-11 05:44:42 -0400
commit3ab7ef28eebf9019eb3d3c4efd7ebfd160106bb1 (patch)
tree6e7467d7a6726b0a377331ae37dd9abf20272d92 /llvm/tools/opt
parentf0ae3c23b5852cb021d1c779f8884e2c94aea7a5 (diff)
downloadllvm-3ab7ef28eebf9019eb3d3c4efd7ebfd160106bb1.zip
llvm-3ab7ef28eebf9019eb3d3c4efd7ebfd160106bb1.tar.gz
llvm-3ab7ef28eebf9019eb3d3c4efd7ebfd160106bb1.tar.bz2
Revert "[MemProf] Use new option/pass for profile feedback and matching"
This reverts commit b4a82b62258c5f650a1cccf5b179933e6bae4867. Broke AMDGPU OpenMP Offload buildbot
Diffstat (limited to 'llvm/tools/opt')
-rw-r--r--llvm/tools/opt/NewPMDriver.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp
index 6ae3f87..5465810b 100644
--- a/llvm/tools/opt/NewPMDriver.cpp
+++ b/llvm/tools/opt/NewPMDriver.cpp
@@ -176,9 +176,6 @@ static cl::opt<PGOKind>
"Use sampled profile to guide PGO.")));
static cl::opt<std::string> ProfileFile("profile-file",
cl::desc("Path to the profile."), cl::Hidden);
-static cl::opt<std::string>
- MemoryProfileFile("memory-profile-file",
- cl::desc("Path to the memory profile."), cl::Hidden);
static cl::opt<CSPGOKind> CSPGOKindFlag(
"cspgo-kind", cl::init(NoCSPGO), cl::Hidden,
@@ -339,21 +336,19 @@ bool llvm::runPassPipeline(
std::optional<PGOOptions> P;
switch (PGOKindFlag) {
case InstrGen:
- P = PGOOptions(ProfileFile, "", "", MemoryProfileFile, FS,
- PGOOptions::IRInstr);
+ P = PGOOptions(ProfileFile, "", "", FS, PGOOptions::IRInstr);
break;
case InstrUse:
- P = PGOOptions(ProfileFile, "", ProfileRemappingFile, MemoryProfileFile, FS,
+ P = PGOOptions(ProfileFile, "", ProfileRemappingFile, FS,
PGOOptions::IRUse);
break;
case SampleUse:
- P = PGOOptions(ProfileFile, "", ProfileRemappingFile, MemoryProfileFile, FS,
+ P = PGOOptions(ProfileFile, "", ProfileRemappingFile, FS,
PGOOptions::SampleUse);
break;
case NoPGO:
- if (DebugInfoForProfiling || PseudoProbeForProfiling ||
- !MemoryProfileFile.empty())
- P = PGOOptions("", "", "", MemoryProfileFile, FS, PGOOptions::NoAction,
+ if (DebugInfoForProfiling || PseudoProbeForProfiling)
+ P = PGOOptions("", "", "", nullptr, PGOOptions::NoAction,
PGOOptions::NoCSAction, DebugInfoForProfiling,
PseudoProbeForProfiling);
else
@@ -374,9 +369,8 @@ bool llvm::runPassPipeline(
P->CSAction = PGOOptions::CSIRInstr;
P->CSProfileGenFile = CSProfileGenFile;
} else
- P = PGOOptions("", CSProfileGenFile, ProfileRemappingFile,
- /*MemoryProfile=*/"", FS, PGOOptions::NoAction,
- PGOOptions::CSIRInstr);
+ P = PGOOptions("", CSProfileGenFile, ProfileRemappingFile, FS,
+ PGOOptions::NoAction, PGOOptions::CSIRInstr);
} else /* CSPGOKindFlag == CSInstrUse */ {
if (!P) {
errs() << "CSInstrUse needs to be together with InstrUse";