[llvm] ce02c79 - [Debugify] Mark mir-check-debugify change nothing of input
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 02:37:33 PST 2022
Author: Shengchen Kan
Date: 2022-02-16T18:37:26+08:00
New Revision: ce02c79dc67601af7dcf9adcaaaff8cd98d85381
URL: https://github.com/llvm/llvm-project/commit/ce02c79dc67601af7dcf9adcaaaff8cd98d85381
DIFF: https://github.com/llvm/llvm-project/commit/ce02c79dc67601af7dcf9adcaaaff8cd98d85381.diff
LOG: [Debugify] Mark mir-check-debugify change nothing of input
Reviewed By: pengfei
Differential Revision: https://reviews.llvm.org/D119914
Added:
Modified:
llvm/lib/CodeGen/MachineCheckDebugify.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/MachineCheckDebugify.cpp b/llvm/lib/CodeGen/MachineCheckDebugify.cpp
index bd7f0f8629475..49b2c822eaeba 100644
--- a/llvm/lib/CodeGen/MachineCheckDebugify.cpp
+++ b/llvm/lib/CodeGen/MachineCheckDebugify.cpp
@@ -27,9 +27,6 @@ namespace {
struct CheckDebugMachineModule : public ModulePass {
bool runOnModule(Module &M) override {
- MachineModuleInfo &MMI =
- getAnalysis<MachineModuleInfoWrapperPass>().getMMI();
-
NamedMDNode *NMD = M.getNamedMetadata("llvm.mir.debugify");
if (!NMD) {
errs() << "WARNING: Please run mir-debugify to generate "
@@ -37,6 +34,9 @@ struct CheckDebugMachineModule : public ModulePass {
return false;
}
+ MachineModuleInfo &MMI =
+ getAnalysis<MachineModuleInfoWrapperPass>().getMMI();
+
auto getDebugifyOperand = [&](unsigned Idx) -> unsigned {
return mdconst::extract<ConstantInt>(NMD->getOperand(Idx)->getOperand(0))
->getZExtValue();
@@ -106,8 +106,7 @@ struct CheckDebugMachineModule : public ModulePass {
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<MachineModuleInfoWrapperPass>();
- AU.addPreserved<MachineModuleInfoWrapperPass>();
- AU.setPreservesCFG();
+ AU.setPreservesAll();
}
static char ID; // Pass identification.
More information about the llvm-commits
mailing list