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

Kyle Butt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 16:45:33 PST 2016


iteratee added inline comments.


================
Comment at: include/llvm/CodeGen/MachineBasicBlock.h:829
+    It--;
+  return It == Begin && It->isDebugValue();
+}
----------------
This is subtly different from the code you're replacing. Specifically if, It == Begin, and Begin is not a debug value, this function returns false, where shrinkInclusiveRange returns true. You need to early return if It == Begin because the resulting range is now empty.


https://reviews.llvm.org/D27782





More information about the llvm-commits mailing list