From 1e6606849add5084894277b54a26590e493532d1 Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Wed, 29 Jan 2014 12:48:32 +0000 Subject: [PATCH] Don't create dummy uses for control dependencies. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/149513002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/lithium-arm.cc | 2 ++ src/ia32/lithium-ia32.cc | 2 ++ src/mips/lithium-mips.cc | 2 ++ src/x64/lithium-x64.cc | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc index 85a2cc7..3885b6b 100644 --- a/src/arm/lithium-arm.cc +++ b/src/arm/lithium-arm.cc @@ -847,10 +847,12 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { if (current->OperandCount() == 0) { instr = DefineAsRegister(new(zone()) LDummy()); } else { + ASSERT(!current->OperandAt(0)->IsControlInstruction()); instr = DefineAsRegister(new(zone()) LDummyUse(UseAny(current->OperandAt(0)))); } for (int i = 1; i < current->OperandCount(); ++i) { + if (current->OperandAt(i)->IsControlInstruction()) continue; LInstruction* dummy = new(zone()) LDummyUse(UseAny(current->OperandAt(i))); dummy->set_hydrogen_value(current); diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc index 80e3d4a..d50313f 100644 --- a/src/ia32/lithium-ia32.cc +++ b/src/ia32/lithium-ia32.cc @@ -911,10 +911,12 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { if (current->OperandCount() == 0) { instr = DefineAsRegister(new(zone()) LDummy()); } else { + ASSERT(!current->OperandAt(0)->IsControlInstruction()); instr = DefineAsRegister(new(zone()) LDummyUse(UseAny(current->OperandAt(0)))); } for (int i = 1; i < current->OperandCount(); ++i) { + if (current->OperandAt(i)->IsControlInstruction()) continue; LInstruction* dummy = new(zone()) LDummyUse(UseAny(current->OperandAt(i))); dummy->set_hydrogen_value(current); diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc index 8a0414a..ee64f8e 100644 --- a/src/mips/lithium-mips.cc +++ b/src/mips/lithium-mips.cc @@ -855,10 +855,12 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { if (current->OperandCount() == 0) { instr = DefineAsRegister(new(zone()) LDummy()); } else { + ASSERT(!current->OperandAt(0)->IsControlInstruction()); instr = DefineAsRegister(new(zone()) LDummyUse(UseAny(current->OperandAt(0)))); } for (int i = 1; i < current->OperandCount(); ++i) { + if (current->OperandAt(i)->IsControlInstruction()) continue; LInstruction* dummy = new(zone()) LDummyUse(UseAny(current->OperandAt(i))); dummy->set_hydrogen_value(current); diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc index 4ef7082..5c3fd70 100644 --- a/src/x64/lithium-x64.cc +++ b/src/x64/lithium-x64.cc @@ -857,10 +857,12 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { if (current->OperandCount() == 0) { instr = DefineAsRegister(new(zone()) LDummy()); } else { + ASSERT(!current->OperandAt(0)->IsControlInstruction()); instr = DefineAsRegister(new(zone()) LDummyUse(UseAny(current->OperandAt(0)))); } for (int i = 1; i < current->OperandCount(); ++i) { + if (current->OperandAt(i)->IsControlInstruction()) continue; LInstruction* dummy = new(zone()) LDummyUse(UseAny(current->OperandAt(i))); dummy->set_hydrogen_value(current); -- 2.7.4