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

Side by Side Diff: src/compiler/move-optimizer.cc

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. 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/instruction.cc ('k') | src/compiler/pipeline.cc » ('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 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/compiler/move-optimizer.h" 5 #include "src/compiler/move-optimizer.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 19 matching lines...) Expand all
30 bool Blocks(const OperandSet& set, const InstructionOperand& operand) { 30 bool Blocks(const OperandSet& set, const InstructionOperand& operand) {
31 if (set.find(operand) != set.end()) return true; 31 if (set.find(operand) != set.end()) return true;
32 // Only FP registers alias. 32 // Only FP registers alias.
33 if (!operand.IsFPRegister()) return false; 33 if (!operand.IsFPRegister()) return false;
34 34
35 const LocationOperand& loc = LocationOperand::cast(operand); 35 const LocationOperand& loc = LocationOperand::cast(operand);
36 MachineRepresentation rep = loc.representation(); 36 MachineRepresentation rep = loc.representation();
37 MachineRepresentation other_fp_rep = rep == MachineRepresentation::kFloat64 37 MachineRepresentation other_fp_rep = rep == MachineRepresentation::kFloat64
38 ? MachineRepresentation::kFloat32 38 ? MachineRepresentation::kFloat32
39 : MachineRepresentation::kFloat64; 39 : MachineRepresentation::kFloat64;
40 const RegisterConfiguration* config = 40 const RegisterConfiguration* config = RegisterConfiguration::Turbofan();
41 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN);
42 if (config->fp_aliasing_kind() != RegisterConfiguration::COMBINE) { 41 if (config->fp_aliasing_kind() != RegisterConfiguration::COMBINE) {
43 // Overlap aliasing case. 42 // Overlap aliasing case.
44 return set.find(LocationOperand(loc.kind(), loc.location_kind(), 43 return set.find(LocationOperand(loc.kind(), loc.location_kind(),
45 other_fp_rep, loc.register_code())) != 44 other_fp_rep, loc.register_code())) !=
46 set.end(); 45 set.end();
47 } 46 }
48 // Combine aliasing case. 47 // Combine aliasing case.
49 int alias_base_index = -1; 48 int alias_base_index = -1;
50 int aliases = config->GetAliases(rep, loc.register_code(), other_fp_rep, 49 int aliases = config->GetAliases(rep, loc.register_code(), other_fp_rep,
51 &alias_base_index); 50 &alias_base_index);
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 static_cast<Instruction::GapPosition>(1), code_zone()); 500 static_cast<Instruction::GapPosition>(1), code_zone());
502 slot_1->AddMove(group_begin->destination(), load->destination()); 501 slot_1->AddMove(group_begin->destination(), load->destination());
503 load->Eliminate(); 502 load->Eliminate();
504 } 503 }
505 loads.clear(); 504 loads.clear();
506 } 505 }
507 506
508 } // namespace compiler 507 } // namespace compiler
509 } // namespace internal 508 } // namespace internal
510 } // namespace v8 509 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698