[PATCH] D53287: [DebugInfo][Dexter] Unreachable line stepped onto after SimplifyCFG.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 09:05:22 PDT 2018


aprantl accepted this revision.
aprantl added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Transforms/Utils/Local.cpp:2532
 
+void llvm::hoistAllInstructionsInto(BasicBlock *DomBlock,Instruction *InsertPt,
+                                    BasicBlock *BB) {
----------------
clang-format please


================
Comment at: lib/Transforms/Utils/Local.cpp:2549
+  // encode predicated DIExpressions that yield different results on different
+  // code paths.
+  for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); II != IE; ) {
----------------
As I explained in https://bugs.llvm.org/show_bug.cgi?id=39141#c8 the more fundamental reason why the dbg.values need to be deleted is because there won't be any instructions with a DILocation in either branch left after performing the transformation. We can only insert a dbg.value after the two branches are joined again.


Repository:
  rL LLVM

https://reviews.llvm.org/D53287





More information about the llvm-commits mailing list