Bug 678377: IonMonkey: Follow-up fixing three small issues, r=bhackett

This commit is contained in:
Hannes Verschore 2013-04-29 14:49:25 +02:00
parent c91f30797b
commit 5d8b79fbec

View File

@ -87,12 +87,15 @@ Loop::init()
//
// Rather than perform a complicated analysis of the dominance graph,
// just return a soft error to ignore this loop.
if (block->immediateDominator() == block)
if (block->immediateDominator() == block) {
while (!worklist_.empty())
popFromWorklist();
return LoopReturn_Skip;
}
// Add not yet visited predecessors to the inlooplist.
if (block != header_) {
for (size_t i = 0; i < block->numPredecessors(); i--) {
for (size_t i = 0; i < block->numPredecessors(); i++) {
MBasicBlock *pred = block->getPredecessor(i);
if (pred->isMarked())
continue;
@ -111,7 +114,7 @@ Loop::init()
for (MInstructionIterator i = block->begin(); i != block->end(); i++) {
MInstruction *ins = *i;
if (ins->isMovable() && !ins->isEffectful()) {
if (isHoistable(ins)) {
if (!insertInWorklist(ins))
return LoopReturn_Error;
}