[PATCH] D71061: [DebugInfo][EarlyCSE] Use the salvageDebugInfoOrMarkUndef(); NFC

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 06:02:22 PST 2019


djtodoro created this revision.
djtodoro added reviewers: aprantl, vsk.
djtodoro added a project: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Use the newest API.


https://reviews.llvm.org/D71061

Files:
  llvm/lib/Transforms/Scalar/EarlyCSE.cpp


Index: llvm/lib/Transforms/Scalar/EarlyCSE.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/EarlyCSE.cpp
+++ llvm/lib/Transforms/Scalar/EarlyCSE.cpp
@@ -907,8 +907,8 @@
         LLVM_DEBUG(dbgs() << "Skipping due to debug counter\n");
         continue;
       }
-      if (!salvageDebugInfo(*Inst))
-        replaceDbgUsesWithUndef(Inst);
+
+      salvageDebugInfoOrMarkUndef(*Inst);
       removeMSSA(Inst);
       Inst->eraseFromParent();
       Changed = true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71061.232324.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191205/32990bd8/attachment-0001.bin>


More information about the llvm-commits mailing list