aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorXiang1 Zhang <xiang1.zhang@intel.com>2020-12-14 17:42:21 -0800
committerXiang1 Zhang <xiang1.zhang@intel.com>2020-12-14 17:48:49 -0800
commitfc0f4010bb4c4fb843218c6e3aa0112ffc67c299 (patch)
treebc37eca745d31cb255bbf82c873bfc30b2aaae34 /llvm/lib/CodeGen/TargetPassConfig.cpp
parentaf68c3b8924218596ecee948cc22cbb2c69c7f42 (diff)
downloadllvm-fc0f4010bb4c4fb843218c6e3aa0112ffc67c299.zip
llvm-fc0f4010bb4c4fb843218c6e3aa0112ffc67c299.tar.gz
llvm-fc0f4010bb4c4fb843218c6e3aa0112ffc67c299.tar.bz2
Revert "[Debugify] Support checking Machine IR debug info"
This reverts commit 57a3d9ec4a8c1422f07264bed9f12a4ea416707e.
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 10c1ff9..48686b9 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -120,12 +120,6 @@ static cl::opt<cl::boolOrDefault> DebugifyAndStripAll(
"Debugify MIR before and Strip debug after "
"each pass except those known to be unsafe when debug info is present"),
cl::ZeroOrMore);
-static cl::opt<cl::boolOrDefault> DebugifyCheckAndStripAll(
- "debugify-check-and-strip-all-safe", cl::Hidden,
- cl::desc(
- "Debugify MIR before, by checking and stripping the debug info after, "
- "each pass except those known to be unsafe when debug info is present"),
- cl::ZeroOrMore);
enum RunOutliner { AlwaysOutline, NeverOutline, TargetDefault };
// Enable or disable the MachineOutliner.
static cl::opt<RunOutliner> EnableMachineOutliner(
@@ -631,26 +625,15 @@ void TargetPassConfig::addStripDebugPass() {
PM->add(createStripDebugMachineModulePass(/*OnlyDebugified=*/true));
}
-void TargetPassConfig::addCheckDebugPass() {
- PM->add(createCheckDebugMachineModulePass());
-}
-
void TargetPassConfig::addMachinePrePasses(bool AllowDebugify) {
- if (AllowDebugify && DebugifyIsSafe &&
- (DebugifyAndStripAll == cl::BOU_TRUE ||
- DebugifyCheckAndStripAll == cl::BOU_TRUE))
+ if (AllowDebugify && DebugifyAndStripAll == cl::BOU_TRUE && DebugifyIsSafe)
addDebugifyPass();
}
void TargetPassConfig::addMachinePostPasses(const std::string &Banner,
bool AllowVerify, bool AllowStrip) {
- if (DebugifyIsSafe) {
- if (DebugifyCheckAndStripAll == cl::BOU_TRUE) {
- addCheckDebugPass();
- addStripDebugPass();
- } else if (DebugifyAndStripAll == cl::BOU_TRUE)
- addStripDebugPass();
- }
+ if (DebugifyAndStripAll == cl::BOU_TRUE && DebugifyIsSafe)
+ addStripDebugPass();
if (AllowVerify)
addVerifyPass(Banner);
}