Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 97c20e724f0fc28226926b330b0546457dc93d6f..568fe9ee7ce69ffc1d5ec8dbc83a6ef1ae5c40e1 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -346,22 +346,33 @@ 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()); |
+ } |
- if (!CpuFeatures::IsSupported(SSE2)) FlushX87StackIfNecessary(instr); |
+ if (!CpuFeatures::IsSupported(SSE2)) FlushX87StackIfNecessary(instr); |
- RecordAndUpdatePosition(instr->position()); |
+ RecordAndUpdatePosition(instr->position()); |
- instr->CompileToNative(this); |
+ instr->CompileToNative(this); |
- if (!CpuFeatures::IsSupported(SSE2)) { |
- if (FLAG_debug_code && FLAG_enable_slow_asserts) { |
- __ VerifyX87StackDepth(x87_stack_depth_); |
+ if (!CpuFeatures::IsSupported(SSE2)) { |
+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { |
+ __ VerifyX87StackDepth(x87_stack_depth_); |
+ } |
+ } |
+ } 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()); |
} |
} |
} |
@@ -2207,6 +2218,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; |