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

Side by Side Diff: src/lithium.cc

Issue 309373002: ARM64: Regenerate instead of spilling and restoring cheap lithium instructions. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/lithium.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 #include "lithium.h" 6 #include "lithium.h"
7 #include "scopes.h" 7 #include "scopes.h"
8 #include "serialize.h" 8 #include "serialize.h"
9 9
10 #if V8_TARGET_ARCH_IA32 10 #if V8_TARGET_ARCH_IA32
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 129
130 void LOperand::TearDownCaches() { 130 void LOperand::TearDownCaches() {
131 #define LITHIUM_OPERAND_TEARDOWN(name, type, number) L##name::TearDownCache(); 131 #define LITHIUM_OPERAND_TEARDOWN(name, type, number) L##name::TearDownCache();
132 LITHIUM_OPERAND_LIST(LITHIUM_OPERAND_TEARDOWN) 132 LITHIUM_OPERAND_LIST(LITHIUM_OPERAND_TEARDOWN)
133 #undef LITHIUM_OPERAND_TEARDOWN 133 #undef LITHIUM_OPERAND_TEARDOWN
134 } 134 }
135 135
136 136
137 bool LMoveOperands::UsesRegeneration() const {
138 bool prefer_regen =
139 (source_->parent_linstr() == destination_->parent_linstr()) &&
140 (destination_->parent_linstr() != NULL) &&
141 destination_->parent_linstr()->PreferRegenerateToSpill();
142 bool one_is_mem = source_->IsInMemory() || destination_->IsInMemory();
143 bool one_is_reg = source_->IsInRegister() || destination_->IsInRegister();
144 return prefer_regen && one_is_mem && one_is_reg;
145 }
146
147
137 bool LParallelMove::IsRedundant() const { 148 bool LParallelMove::IsRedundant() const {
138 for (int i = 0; i < move_operands_.length(); ++i) { 149 for (int i = 0; i < move_operands_.length(); ++i) {
139 if (!move_operands_[i].IsRedundant()) return false; 150 if (!move_operands_[i].IsRedundant()) return false;
140 } 151 }
141 return true; 152 return true;
142 } 153 }
143 154
144 155
145 void LParallelMove::PrintDataTo(StringStream* stream) const { 156 void LParallelMove::PrintDataTo(StringStream* stream) const {
146 bool first = true; 157 bool first = true;
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 624
614 625
615 LPhase::~LPhase() { 626 LPhase::~LPhase() {
616 if (ShouldProduceTraceOutput()) { 627 if (ShouldProduceTraceOutput()) {
617 isolate()->GetHTracer()->TraceLithium(name(), chunk_); 628 isolate()->GetHTracer()->TraceLithium(name(), chunk_);
618 } 629 }
619 } 630 }
620 631
621 632
622 } } // namespace v8::internal 633 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698