[PATCH] D115623: [Debugify] Use DebugifyLevel in Debugify original mode

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 15 04:49:56 PST 2021


StephenTozer accepted this revision.
StephenTozer added a comment.
This revision is now accepted and ready to land.

Aside from the mentioned nit, LGTM.

Normally I'd say that the test should also check that the debug values are actually being dropped, to ensure that the test doesn't silently become invalid if some future change causes the debug values to not be dropped. However, I don't think any future change would prevent the debug values from being dropped by deadargelim, so it should be safe I think.



================
Comment at: llvm/lib/Transforms/Utils/Debugify.cpp:323
 
-        // Collect dbg.values and dbg.declares.
-        if (auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I)) {
-          if (!SP)
-            continue;
-          // Skip inlined variables.
-          if (I.getDebugLoc().getInlinedAt())
-            continue;
-          // Skip undef values.
-          if (DVI->isUndef())
+        // Cllect dbg.values and dbg.declare.
+        if (DebugifyLevel > Level::Locations) {
----------------
Orlando wrote:
> nit: missing o in Collect and s in dbg.declares.
Accidentally removed the 'o' and 's'?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115623



More information about the llvm-commits mailing list