[PATCH] D25742: Remove debug location from common tail when tail-merging

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 12:42:38 PDT 2016


MatzeB added inline comments.


================
Comment at: llvm/trunk/lib/CodeGen/BranchFolding.cpp:899-902
+    // Remove the original debug location from the common tail.
+    for (auto &MI : *MBB)
+      if (!MI.isDebugValue())
+        MI.setDebugLoc(DebugLoc());
----------------
You could avoid the extra loop by putting this code into mergeOperations() (line 770 already has a check for isDebugValue()).


Repository:
  rL LLVM

https://reviews.llvm.org/D25742





More information about the llvm-commits mailing list