[PATCH] D45975: [DebugInfo] Invalidate debug info in ReassociatePass::RewriteExprTree

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 11:23:13 PDT 2018


aprantl added inline comments.


================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:785
+
+      // Discard any debug info related to the expressions that has changed (we
+      // can leave debug infor related to the root, since the result of the
----------------
has -> have


================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:786
+      // Discard any debug info related to the expressions that has changed (we
+      // can leave debug infor related to the root, since the result of the
+      // expression tree should be the same even after reassociation).
----------------
infor -> info


================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:791
+      for (auto *DII : DbgUsers)
+        DII->setOperand(0, MetadataAsValue::get(DII->getContext(), nullptr));
+
----------------
I think it would be better use use and undef instead of a nullptr here. Otherwise the intrinsic may will be deleted and doesn't serve as an end point of the live range opened by the previous intrinsic describing the same variable any more.


Repository:
  rL LLVM

https://reviews.llvm.org/D45975





More information about the llvm-commits mailing list