[PATCH] D115351: [Debugify] Port verify-debuginfo-preserve to NewPM

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 10:04:05 PDT 2022


aeubanks added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Debugify.cpp:952
 PreservedAnalyses NewPMDebugifyPass::run(Module &M, ModuleAnalysisManager &) {
-  applyDebugifyMetadata(M, M.functions(),
-                        "ModuleDebugify: ", /*ApplyToMF*/ nullptr);
+  if (Mode == DebugifyMode::SyntheticDebugInfo)
+    applyDebugifyMetadata(M, M.functions(),
----------------
should this and the other addition below be separate passes? doesn't look like the two modes share a lot


================
Comment at: llvm/test/DebugInfo/verify-di-preserve.ll:15
+
+; RUN: opt %s -verify-each-debuginfo-preserve -O2 -enable-new-pm=false -disable-output 2>&1 | FileCheck --check-prefix=VERIFY-EACH-LEGACY-PM %s
+
----------------
I'd rather not test the legacy PM, it's in the process of being removed, ditto for the other RUN lines


================
Comment at: llvm/tools/opt/opt.cpp:206
 
 static cl::opt<bool> VerifyDebugInfoPreserve(
     "verify-debuginfo-preserve",
----------------
we should move all these options into NewPMDriver.cpp and remove support for them in the legacy PM.
can be a separate change though


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115351/new/

https://reviews.llvm.org/D115351



More information about the llvm-commits mailing list