[DebugInfo][EarlyCSE] Use the salvageDebugInfoOrMarkUndef(); NFC
authorDjordje Todorovic <djordje.todorovic@rt-rk.com>
Thu, 5 Dec 2019 13:28:55 +0000 (14:28 +0100)
committerDjordje Todorovic <djordje.todorovic@rt-rk.com>
Mon, 9 Dec 2019 12:57:35 +0000 (13:57 +0100)
Use the newest API.

Differential Revision: https://reviews.llvm.org/D71061

llvm/lib/Transforms/Scalar/EarlyCSE.cpp

index 813b1c9..40c1ba8 100644 (file)
@@ -907,8 +907,8 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
         LLVM_DEBUG(dbgs() << "Skipping due to debug counter\n");
         continue;
       }
-      if (!salvageDebugInfo(*Inst))
-        replaceDbgUsesWithUndef(Inst);
+
+      salvageDebugInfoOrMarkUndef(*Inst);
       removeMSSA(Inst);
       Inst->eraseFromParent();
       Changed = true;