mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Fix an infinite loop bug that Vladimir Prus identified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28281 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c7365a9ec9
commit
ca960c9946
@ -86,9 +86,10 @@ inline bool SplitCriticalEdge(BasicBlock *Succ, pred_iterator PI, Pass *P = 0) {
|
||||
|
||||
inline bool SplitCriticalEdge(BasicBlock *Src, BasicBlock *Dst, Pass *P = 0) {
|
||||
TerminatorInst *TI = Src->getTerminator();
|
||||
for (unsigned i = 0, e = TI->getNumSuccessors(); ; ++i)
|
||||
for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i)
|
||||
if (TI->getSuccessor(i) == Dst)
|
||||
return SplitCriticalEdge(TI, i, P);
|
||||
return false;
|
||||
}
|
||||
} // End llvm namespace
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user