[PATCH] D46184: [BranchFolding] Salvage DBG_VALUE instructions from empty blocks

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 10:01:58 PDT 2018


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

Thanks for the analysis! It sounds like running LiveDebugValues after MI scheduling is the right way to go at this point in time. Assuming that scheduling happens after branch folding, let's do this patch for now. Also, LiveDebugValues wouldn't do the kind of backwards propagation that you are doing here, so I'd consider this a cheap enabler for LiveDebugValues to be more effective.



================
Comment at: lib/CodeGen/BranchFolding.cpp:1392
+  // If this MBB is the only predecessor of a successor it should be
+  // possible to copy DBG_VALUE instructions to the beginning of the
+  // successor.
----------------
ditto


================
Comment at: lib/CodeGen/BranchFolding.cpp:1397
+      copyDebugInfoToSuccessor(TII, MBB, *SuccBB);
+  // If this MBB is the only successor of a predecessor it should be
+  // possible to copy the DBG_VALUE instructions to the end of the
----------------
s/should be possible/ is legal/


Repository:
  rL LLVM

https://reviews.llvm.org/D46184





More information about the llvm-commits mailing list