mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-23 11:49:50 +00:00
[SjLj] Replace recursive block marking algorithm with iterative algorithm
Summary: Some programs run into a stack overflow issue. This change avoids this problem by replacing the recursive algorithm with the iterative version. Reviewers: MatzeB, t.p.northover, dblaikie Reviewed By: MatzeB Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35105 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e7149b956e
commit
5dcc05955f
@ -125,8 +125,11 @@ static void MarkBlocksLiveIn(BasicBlock *BB,
|
||||
if (!LiveBBs.insert(BB).second)
|
||||
return; // already been here.
|
||||
|
||||
for (BasicBlock *PredBB : predecessors(BB))
|
||||
MarkBlocksLiveIn(PredBB, LiveBBs);
|
||||
df_iterator_default_set<BasicBlock*> Visited;
|
||||
|
||||
for (BasicBlock *B : inverse_depth_first_ext(BB, Visited))
|
||||
LiveBBs.insert(B);
|
||||
|
||||
}
|
||||
|
||||
/// substituteLPadValues - Substitute the values returned by the landingpad
|
||||
|
Loading…
Reference in New Issue
Block a user