Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 1525565f190c084eee9a23760bbaadca76b71183..ac192f6731218d10f99915092ad7d528666e2ba0 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -841,7 +841,14 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { |
chunk_->AddInstruction(dummy, current_block_); |
} |
} else { |
- instr = current->CompileToLithium(this); |
+ HBasicBlock* successor; |
+ if (current->IsControlInstruction() && |
+ HControlInstruction::cast(current)->KnownSuccessorBlock(&successor) && |
+ successor != NULL) { |
+ instr = new(zone()) LGoto(successor); |
+ } else { |
+ instr = current->CompileToLithium(this); |
+ } |
} |
argument_count_ += current->argument_delta(); |
@@ -927,9 +934,6 @@ LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
- LInstruction* goto_instr = CheckElideControlInstruction(instr); |
- if (goto_instr != NULL) return goto_instr; |
- |
HValue* value = instr->value(); |
Representation r = value->representation(); |
HType type = value->type(); |
@@ -954,9 +958,6 @@ LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { |
- LInstruction* goto_instr = CheckElideControlInstruction(instr); |
- if (goto_instr != NULL) return goto_instr; |
- |
ASSERT(instr->value()->representation().IsTagged()); |
LOperand* value = UseRegisterAtStart(instr->value()); |
LOperand* temp = TempRegister(); |
@@ -1682,8 +1683,6 @@ LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
LInstruction* LChunkBuilder::DoCompareNumericAndBranch( |
HCompareNumericAndBranch* instr) { |
- LInstruction* goto_instr = CheckElideControlInstruction(instr); |
- if (goto_instr != NULL) return goto_instr; |
Representation r = instr->representation(); |
if (r.IsSmiOrInteger32()) { |
ASSERT(instr->left()->representation().Equals(r)); |
@@ -1704,8 +1703,6 @@ LInstruction* LChunkBuilder::DoCompareNumericAndBranch( |
LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( |
HCompareObjectEqAndBranch* instr) { |
- LInstruction* goto_instr = CheckElideControlInstruction(instr); |
- if (goto_instr != NULL) return goto_instr; |
LOperand* left = UseRegisterAtStart(instr->left()); |
LOperand* right = UseRegisterAtStart(instr->right()); |
return new(zone()) LCmpObjectEqAndBranch(left, right); |
@@ -1721,8 +1718,6 @@ LInstruction* LChunkBuilder::DoCompareHoleAndBranch( |
LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( |
HCompareMinusZeroAndBranch* instr) { |
- LInstruction* goto_instr = CheckElideControlInstruction(instr); |
- if (goto_instr != NULL) return goto_instr; |
LOperand* value = UseRegister(instr->value()); |
LOperand* scratch = TempRegister(); |
return new(zone()) LCompareMinusZeroAndBranch(value, scratch); |
@@ -2495,9 +2490,6 @@ LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { |
LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) { |
- LInstruction* goto_instr = CheckElideControlInstruction(instr); |
- if (goto_instr != NULL) return goto_instr; |
- |
return new(zone()) LTypeofIsAndBranch(UseRegister(instr->value())); |
} |