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

Side by Side Diff: src/compiler/register-allocator.cc

Issue 2101653003: [Turbofan] Simplify operand canonicalization on archs with simple FP aliasing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 5 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
« no previous file with comments | « src/compiler/move-optimizer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 "src/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/linkage.h" 6 #include "src/compiler/linkage.h"
7 #include "src/compiler/register-allocator.h" 7 #include "src/compiler/register-allocator.h"
8 #include "src/string-stream.h" 8 #include "src/string-stream.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 for (int i = 0; i < config()->num_allocatable_double_registers(); ++i) { 2063 for (int i = 0; i < config()->num_allocatable_double_registers(); ++i) {
2064 int code = config()->GetAllocatableDoubleCode(i); 2064 int code = config()->GetAllocatableDoubleCode(i);
2065 if (!IsOutputFPRegisterOf(instr, MachineRepresentation::kFloat64, 2065 if (!IsOutputFPRegisterOf(instr, MachineRepresentation::kFloat64,
2066 code)) { 2066 code)) {
2067 TopLevelLiveRange* range = 2067 TopLevelLiveRange* range =
2068 FixedFPLiveRangeFor(code, MachineRepresentation::kFloat64); 2068 FixedFPLiveRangeFor(code, MachineRepresentation::kFloat64);
2069 range->AddUseInterval(curr_position, curr_position.End(), 2069 range->AddUseInterval(curr_position, curr_position.End(),
2070 allocation_zone()); 2070 allocation_zone());
2071 } 2071 }
2072 } 2072 }
2073 for (int i = 0; i < config()->num_allocatable_float_registers(); ++i) { 2073 // Preserve fixed float registers on archs with non-simple aliasing.
2074 int code = config()->GetAllocatableFloatCode(i); 2074 if (!kSimpleFPAliasing) {
2075 if (!IsOutputFPRegisterOf(instr, MachineRepresentation::kFloat32, 2075 for (int i = 0; i < config()->num_allocatable_float_registers(); ++i) {
2076 code)) { 2076 int code = config()->GetAllocatableFloatCode(i);
2077 TopLevelLiveRange* range = 2077 if (!IsOutputFPRegisterOf(instr, MachineRepresentation::kFloat32,
2078 FixedFPLiveRangeFor(code, MachineRepresentation::kFloat32); 2078 code)) {
2079 range->AddUseInterval(curr_position, curr_position.End(), 2079 TopLevelLiveRange* range =
2080 allocation_zone()); 2080 FixedFPLiveRangeFor(code, MachineRepresentation::kFloat32);
2081 range->AddUseInterval(curr_position, curr_position.End(),
2082 allocation_zone());
2083 }
2081 } 2084 }
2082 } 2085 }
2083 } 2086 }
2084 2087
2085 for (size_t i = 0; i < instr->InputCount(); i++) { 2088 for (size_t i = 0; i < instr->InputCount(); i++) {
2086 InstructionOperand* input = instr->InputAt(i); 2089 InstructionOperand* input = instr->InputAt(i);
2087 if (input->IsImmediate() || input->IsExplicit()) { 2090 if (input->IsImmediate() || input->IsExplicit()) {
2088 continue; // Ignore immediates and explicitly reserved registers. 2091 continue; // Ignore immediates and explicitly reserved registers.
2089 } 2092 }
2090 LifetimePosition use_pos; 2093 LifetimePosition use_pos;
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
3766 } 3769 }
3767 } 3770 }
3768 } 3771 }
3769 } 3772 }
3770 } 3773 }
3771 3774
3772 3775
3773 } // namespace compiler 3776 } // namespace compiler
3774 } // namespace internal 3777 } // namespace internal
3775 } // namespace v8 3778 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/move-optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698