mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Rather than just infinite looping, or abort compilation on would-be iloops (bug 803470, r=dvander)
This commit is contained in:
parent
1eabbb231a
commit
75fa3c1a38
@ -495,7 +495,9 @@ PopFromWorklist(MDefinitionVector &worklist)
|
||||
bool
|
||||
RangeAnalysis::analyze()
|
||||
{
|
||||
int numBlocks = 0;
|
||||
for (PostorderIterator i(graph_.poBegin()); i != graph_.poEnd(); i++) {
|
||||
numBlocks++;
|
||||
MBasicBlock *curBlock = *i;
|
||||
if (!curBlock->isLoopHeader())
|
||||
continue;
|
||||
@ -531,6 +533,8 @@ RangeAnalysis::analyze()
|
||||
}
|
||||
}
|
||||
iters++;
|
||||
if (iters >= numBlocks * 100)
|
||||
return false;
|
||||
}
|
||||
// Cleanup (in case we stopped due to MAX_ITERS)
|
||||
for(size_t i = 0; i < worklist.length(); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user