Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(865)

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 10832411: Remove support for non-ssa optimizing code generation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: disable optimizations on bailout Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 6ef086d149696fd22399c3f279a55cfaf51ed8d0..77d8dd8dbf59dbc4477a5d2a1ce4af9eb4a9f14e 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -33,12 +33,8 @@ LocationSummary* Computation::MakeCallSummary() {
void BindInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
computation()->EmitNativeCode(compiler);
- if (is_used() && locs()->out().IsRegister()) {
- // TODO(vegorov): this should really happen only for comparisons fused
- // with branches. Currrently IR does not provide an easy way to remove
- // instructions from the graph so we just leave fused comparison in it
- // but change its result location to be NoLocation.
- compiler->frame_register_allocator()->Push(locs()->out().reg(), this);
+ if (is_used() && !compiler->is_optimizing()) {
+ __ pushq(locs()->out().reg());
}
}
@@ -464,9 +460,7 @@ static void EmitCheckedStrictEqual(FlowGraphCompiler* compiler,
Register temp = locs.temp(0).reg();
Label* deopt = compiler->AddDeoptStub(deopt_id,
try_index,
- kDeoptEquality,
- left,
- right);
+ kDeoptEquality);
__ testq(left, Immediate(kSmiTagMask));
__ j(ZERO, deopt);
// 'left' is not Smi.
@@ -573,9 +567,7 @@ static void EmitSmiComparisonOp(FlowGraphCompiler* compiler,
Register temp = locs.temp(0).reg();
Label* deopt = compiler->AddDeoptStub(deopt_id,
try_index,
- kDeoptSmiCompareSmi,
- left,
- right);
+ kDeoptSmiCompareSmi);
__ movq(temp, left);
__ orq(temp, right);
__ testq(temp, Immediate(kSmiTagMask));
@@ -628,9 +620,7 @@ static void EmitDoubleComparisonOp(FlowGraphCompiler* compiler,
Register temp = locs.temp(0).reg();
Label* deopt = compiler->AddDeoptStub(deopt_id,
try_index,
- kDeoptDoubleComparison,
- left,
- right);
+ kDeoptDoubleComparison);
compiler->LoadDoubleOrSmiToXmm(XMM0, left, temp, deopt);
compiler->LoadDoubleOrSmiToXmm(XMM1, right, temp, deopt);
@@ -851,9 +841,7 @@ void LoadIndexedComp::EmitNativeCode(FlowGraphCompiler* compiler) {
Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
original()->try_index(),
- deopt_reason,
- receiver,
- index);
+ deopt_reason);
__ testq(receiver, Immediate(kSmiTagMask)); // Deoptimize if Smi.
__ j(ZERO, deopt);
@@ -921,10 +909,7 @@ void StoreIndexedComp::EmitNativeCode(FlowGraphCompiler* compiler) {
Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
original()->try_index(),
- kDeoptStoreIndexed,
- receiver,
- index,
- value);
+ kDeoptStoreIndexed);
__ testq(receiver, Immediate(kSmiTagMask)); // Deoptimize if Smi.
__ j(ZERO, deopt);
@@ -986,8 +971,7 @@ void LoadInstanceFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(original() != NULL);
Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
original()->try_index(),
- kDeoptInstanceGetterSameTarget,
- instance_reg);
+ kDeoptInstanceGetterSameTarget);
// Smis do not have instance fields (Smi class is always first).
// Use 'result' as temporary register.
ASSERT(result_reg != instance_reg);
@@ -1121,8 +1105,7 @@ void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(original() != NULL);
Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
original()->try_index(),
- kDeoptInstanceGetterSameTarget,
- instance_reg);
+ kDeoptInstanceGetterSameTarget);
// Smis do not have instance fields (Smi class is always first).
// Use 'result' as temporary register.
ASSERT(result_reg != instance_reg);
@@ -1530,9 +1513,7 @@ static void EmitSmiBinaryOp(FlowGraphCompiler* compiler, BinaryOpComp* comp) {
if (can_deopt) {
deopt = compiler->AddDeoptStub(comp->instance_call()->deopt_id(),
comp->instance_call()->try_index(),
- kDeoptSmiBinaryOp,
- temp,
- right);
+ kDeoptSmiBinaryOp);
}
if (left_is_smi && right_is_smi) {
if (can_deopt) {
@@ -1696,9 +1677,7 @@ static void EmitMintBinaryOp(FlowGraphCompiler* compiler, BinaryOpComp* comp) {
ASSERT(comp->op_kind() == Token::kBIT_AND);
Label* deopt = compiler->AddDeoptStub(comp->instance_call()->deopt_id(),
comp->instance_call()->try_index(),
- kDeoptMintBinaryOp,
- left,
- right);
+ kDeoptMintBinaryOp);
Label mint_static_call, smi_static_call, non_smi, smi_smi, done;
__ testq(left, Immediate(kSmiTagMask)); // Is receiver Smi?
__ j(NOT_ZERO, &non_smi);
@@ -1872,8 +1851,7 @@ void UnarySmiOpComp::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(value == result);
Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
instance_call()->try_index(),
- kDeoptUnaryOp,
- value);
+ kDeoptUnaryOp);
if (test_class_id == kSmiCid) {
__ testq(value, Immediate(kSmiTagMask));
__ j(NOT_ZERO, deopt);
@@ -1923,8 +1901,7 @@ void NumberNegateComp::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(value == result);
Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
instance_call()->try_index(),
- kDeoptUnaryOp,
- value);
+ kDeoptUnaryOp);
if (test_class_id == kDoubleCid) {
Register temp = locs()->temp(0).reg();
__ testq(value, Immediate(kSmiTagMask));
@@ -1973,8 +1950,7 @@ void DoubleToDoubleComp::EmitNativeCode(FlowGraphCompiler* compiler) {
Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
instance_call()->try_index(),
- kDeoptDoubleToDouble,
- value);
+ kDeoptDoubleToDouble);
__ testq(value, Immediate(kSmiTagMask));
__ j(ZERO, deopt); // Deoptimize if Smi.
@@ -2226,8 +2202,7 @@ void CheckClassComp::EmitNativeCode(FlowGraphCompiler* compiler) {
Register temp = locs()->temp(0).reg();
Label* deopt = compiler->AddDeoptStub(deopt_id(),
try_index(),
- kDeoptCheckClass,
- value);
+ kDeoptCheckClass);
ASSERT(ic_data()->GetReceiverClassIdAt(0) != kSmiCid);
__ testq(value, Immediate(kSmiTagMask));
__ j(ZERO, deopt);
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698