[PATCH] D27782: [codegen] Add generic functions to skip debug values.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 16:20:51 PST 2016


MatzeB accepted this revision.
MatzeB added a reviewer: MatzeB.
MatzeB added a comment.

LGTM.



================
Comment at: lib/CodeGen/BranchFolding.cpp:1831-1832
     // Skip dbg_value instructions. These do not count.
-    if (TIB->isDebugValue()) {
-      while (TIB != TIE && TIB->isDebugValue())
-        ++TIB;
-      if (TIB == TIE)
-        break;
-    }
-    if (FIB->isDebugValue()) {
-      while (FIB != FIE && FIB->isDebugValue())
-        ++FIB;
-      if (FIB == FIE)
-        break;
-    }
+    TIB = skipDebugInstructionsForward(TIB , TIE);
+    FIB = skipDebugInstructionsForward(FIB , FIE);
+    if (TIB == TIE || FIB == FIE)
----------------
extra space before the comma.


https://reviews.llvm.org/D27782





More information about the llvm-commits mailing list