mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
add a helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22823 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fae59b99b8
commit
bb20372e70
@ -84,6 +84,13 @@ inline bool SplitCriticalEdge(BasicBlock *Succ, pred_iterator PI, Pass *P = 0) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user