Reviewers: Toon Verwaest,
Message:
Committed patchset #1 manually as r16680 (presubmit successful).
Description:
Revert "Fix phis for non-sse2 double values"
Need to investigate box2d regression.
BUG=
[email protected]
Committed: https://code.google.com/p/v8/source/detail?r=16680
Please review this at https://codereview.chromium.org/23437028/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+7, -55 lines):
M src/ia32/lithium-codegen-ia32.h
M src/ia32/lithium-codegen-ia32.cc
M src/ia32/lithium-ia32.h
M src/ia32/lithium-ia32.cc
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc
b/src/ia32/lithium-codegen-ia32.cc
index
f502b658a7683981ee6079e86a97f099ffa7ad86..860646c2fd60417e2fdfe5640eabe15cb61c0211
100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -382,13 +382,9 @@ bool LCodeGen::GenerateBody() {
instr->CompileToNative(this);
- if (!CpuFeatures::IsSupported(SSE2)) {
- if (instr->IsGoto()) {
- x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr));
- } else if (FLAG_debug_code && FLAG_enable_slow_asserts &&
- !instr->IsGap() && !instr->IsReturn()) {
+ if (!CpuFeatures::IsSupported(SSE2) &&
+ FLAG_debug_code && FLAG_enable_slow_asserts) {
__ VerifyX87StackDepth(x87_stack_.depth());
- }
}
}
EnsureSpaceForLazyDeopt();
@@ -686,21 +682,6 @@ void
LCodeGen::X87Stack::FlushIfNecessary(LInstruction* instr, LCodeGen* cgen) {
__ fstp(0);
stack_depth_--;
}
- __ VerifyX87StackDepth(0);
- }
-}
-
-
-void LCodeGen::X87Stack::LeavingBlock(int current_block_id, LGoto*
goto_instr) {
- ASSERT(stack_depth_ <= 1);
- // If ever used for new stubs producing two pairs of doubles joined into
two
- // phis this assert hits. That situation is not handled, since the two
stacks
- // might have st0 and st1 swapped.
- if (current_block_id + 1 != goto_instr->block_id()) {
- // If we have a value on the x87 stack on leaving a block, it must be a
- // phi input. If the next block we compile is not the join block, we
have
- // to discard the stack state.
- stack_depth_ = 0;
}
}
@@ -2505,10 +2486,6 @@ void LCodeGen::EmitGoto(int block) {
}
-void LCodeGen::DoClobberDoubles(LClobberDoubles* instr) {
-}
-
-
void LCodeGen::DoGoto(LGoto* instr) {
EmitGoto(instr->block_id());
}
Index: src/ia32/lithium-codegen-ia32.h
diff --git a/src/ia32/lithium-codegen-ia32.h
b/src/ia32/lithium-codegen-ia32.h
index
b097694f179c0972dd2501f61523d50c3b0d7119..cc1747d07bef74e9299cdcd0ffac43218a214836
100644
--- a/src/ia32/lithium-codegen-ia32.h
+++ b/src/ia32/lithium-codegen-ia32.h
@@ -471,7 +471,6 @@ class LCodeGen V8_FINAL BASE_EMBEDDED {
void PrepareToWrite(X87Register reg);
void CommitWrite(X87Register reg);
void FlushIfNecessary(LInstruction* instr, LCodeGen* cgen);
- void LeavingBlock(int current_block_id, LGoto* goto_instr);
int depth() const { return stack_depth_; }
void pop() {
ASSERT(is_mutable_);
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index
e2eee19c841bf223e2b1f45898cfcbd6e2a2ddce..07dbf13d19a3d4b20ccfb8d99cdc1ab0ddb1885b
100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -954,16 +954,6 @@ void LChunkBuilder::VisitInstruction(HInstruction*
current) {
if (FLAG_stress_environments && !instr->HasEnvironment()) {
instr = AssignEnvironment(instr);
}
- if (!CpuFeatures::IsSafeForSnapshot(SSE2) && instr->IsGoto() &&
- LGoto::cast(instr)->jumps_to_join()) {
- // TODO(olivf) Since phis of spilled values are joined as registers
- // (not in the stack slot), we need to allow the goto gaps to keep
one
- // x87 register alive. To ensure all other values are still spilled,
we
- // insert a fpu register barrier right before.
- LClobberDoubles* clobber = new(zone()) LClobberDoubles();
- clobber->set_hydrogen_value(current);
- chunk_->AddInstruction(clobber, current_block_);
- }
instr->set_hydrogen_value(current);
chunk_->AddInstruction(instr, current_block_);
}
@@ -1056,7 +1046,7 @@ LEnvironment* LChunkBuilder::CreateEnvironment(
LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
- return new(zone()) LGoto(instr->FirstSuccessor());
+ return new(zone()) LGoto(instr->FirstSuccessor()->block_id());
}
@@ -1068,7 +1058,7 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr)
{
HBasicBlock* successor = HConstant::cast(value)->BooleanValue()
? instr->FirstSuccessor()
: instr->SecondSuccessor();
- return new(zone()) LGoto(successor);
+ return new(zone()) LGoto(successor->block_id());
}
ToBooleanStub::Types expected = instr->expected_input_types();
Index: src/ia32/lithium-ia32.h
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h
index
d96764f3b5edbe465a97a9f57cae60a25a36457c..ab964af65f30529824bbed2efd108273821b92cc
100644
--- a/src/ia32/lithium-ia32.h
+++ b/src/ia32/lithium-ia32.h
@@ -73,7 +73,6 @@ class LCodeGen;
V(ClampTToUint8) \
V(ClampTToUint8NoSSE2) \
V(ClassOfTestAndBranch) \
- V(ClobberDoubles) \
V(CompareNumericAndBranch) \
V(CmpObjectEqAndBranch) \
V(CmpHoleAndBranch) \
@@ -407,32 +406,19 @@ class LInstructionGap V8_FINAL : public LGap {
};
-class LClobberDoubles V8_FINAL : public LTemplateInstruction<0, 0, 0> {
- public:
- LClobberDoubles() { ASSERT(!CpuFeatures::IsSafeForSnapshot(SSE2)); }
-
- virtual bool ClobbersDoubleRegisters() const { return true; }
-
- DECLARE_CONCRETE_INSTRUCTION(ClobberDoubles, "clobber-d")
-};
-
-
class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
public:
- explicit LGoto(HBasicBlock* block) : block_(block) { }
+ explicit LGoto(int block_id) : block_id_(block_id) { }
virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
virtual bool IsControl() const V8_OVERRIDE { return true; }
- int block_id() const { return block_->block_id(); }
- virtual bool ClobbersDoubleRegisters() const { return false; }
-
- bool jumps_to_join() const { return block_->predecessors()->length() >
1; }
+ int block_id() const { return block_id_; }
private:
- HBasicBlock* block_;
+ int block_id_;
};
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.