Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 9ec80f819a062dbf3078fc4a0487b765177a19cb..b00fb818fd020af43e97cfe66ed47c3191ae6edd 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -267,16 +267,27 @@ bool LCodeGen::GenerateBody() { |
} |
if (!emit_instructions) continue; |
- if (FLAG_code_comments && instr->HasInterestingComment(this)) { |
- Comment(";;; <@%d,#%d> %s", |
- current_instruction_, |
- instr->hydrogen_value()->id(), |
- instr->Mnemonic()); |
- } |
+ if (instr->hydrogen_value()->block()->IsReachable()) { |
+ if (FLAG_code_comments && instr->HasInterestingComment(this)) { |
+ Comment(";;; <@%d,#%d> %s", |
+ current_instruction_, |
+ instr->hydrogen_value()->id(), |
+ instr->Mnemonic()); |
+ } |
- RecordAndUpdatePosition(instr->position()); |
+ RecordAndUpdatePosition(instr->position()); |
- instr->CompileToNative(this); |
+ instr->CompileToNative(this); |
+ } else { |
+ if (FLAG_code_comments && instr->IsLabel()) { |
+ Comment( |
+ ";;; <@%d,#%d> -------------------- B%d (unreachable/elided) " |
+ "--------------------", |
+ current_instruction_, |
+ instr->hydrogen_value()->id(), |
+ instr->hydrogen_value()->block()->block_id()); |
+ } |
+ } |
} |
EnsureSpaceForLazyDeopt(); |
last_lazy_deopt_pc_ = masm()->pc_offset(); |
@@ -2146,6 +2157,7 @@ void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
int LCodeGen::GetNextEmittedBlock() const { |
for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { |
+ if (!graph()->blocks()->at(i)->IsReachable()) continue; |
if (!chunk_->GetLabel(i)->HasReplacement()) return i; |
} |
return -1; |