[llvm-commits] CVS: llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Aug 16 23:34:49 PDT 2005
Changes in directory llvm/include/llvm/Transforms/Utils:
BasicBlockUtils.h updated: 1.9 -> 1.10
---
Log message:
add a helper
---
Diffs of the changes: (+7 -0)
BasicBlockUtils.h | 7 +++++++
1 files changed, 7 insertions(+)
Index: llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
diff -u llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h:1.9 llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h:1.10
--- llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h:1.9 Thu Apr 21 15:59:05 2005
+++ llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h Wed Aug 17 01:34:37 2005
@@ -84,6 +84,13 @@
return MadeChange;
}
+inline bool SplitCriticalEdge(BasicBlock *Src, BasicBlock *Dst, Pass *P = 0) {
+ for (succ_iterator SI = succ_begin(Src); ; ++SI) {
+ assert(SI != succ_end(Src) && "Edge doesn't exist");
+ if (*SI == Dst)
+ return SplitCriticalEdge(Src, SI, P);
+ }
+}
} // End llvm namespace
#endif
More information about the llvm-commits
mailing list