[PATCH] D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 03:28:19 PST 2020


Orlando added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1259
     if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(PrevI))
-      if (DVI->getValue() == I->getOperand(0) &&
-          DVI->getVariable() == DIVar &&
-          DVI->getExpression() == DIExpr)
+      if (isDbgValueMatching(DVI, I->getOperand(0), DIVar, DIExpr, DbgLoc))
+        return true;
----------------
@aprantl said:
>Is checking the first instruction after going to be good enough in the general case?

In this case shouldn't the 'already exists before I' check also be a backwards scan (through consecutive dbg.values)?


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

https://reviews.llvm.org/D74030





More information about the llvm-commits mailing list