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

Side by Side Diff: src/compiler/move-optimizer.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/instruction.cc ('k') | src/compiler/register-allocator.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 11 matching lines...) Expand all
22 } 22 }
23 return a.source.CompareCanonicalized(b.source); 23 return a.source.CompareCanonicalized(b.source);
24 } 24 }
25 }; 25 };
26 26
27 typedef ZoneMap<MoveKey, unsigned, MoveKeyCompare> MoveMap; 27 typedef ZoneMap<MoveKey, unsigned, MoveKeyCompare> MoveMap;
28 typedef ZoneSet<InstructionOperand, CompareOperandModuloType> OperandSet; 28 typedef ZoneSet<InstructionOperand, CompareOperandModuloType> OperandSet;
29 29
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 on archs with non-simple aliasing need extra checks.
33 if (!operand.IsFPRegister()) return false; 33 if (!operand.IsFPRegister() || kSimpleFPAliasing) 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 = RegisterConfiguration::Turbofan(); 40 const RegisterConfiguration* config = RegisterConfiguration::Turbofan();
41 if (config->fp_aliasing_kind() != RegisterConfiguration::COMBINE) { 41 if (config->fp_aliasing_kind() != RegisterConfiguration::COMBINE) {
42 // Overlap aliasing case. 42 // Overlap aliasing case.
43 return set.find(LocationOperand(loc.kind(), loc.location_kind(), 43 return set.find(LocationOperand(loc.kind(), loc.location_kind(),
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 static_cast<Instruction::GapPosition>(1), code_zone()); 500 static_cast<Instruction::GapPosition>(1), code_zone());
501 slot_1->AddMove(group_begin->destination(), load->destination()); 501 slot_1->AddMove(group_begin->destination(), load->destination());
502 load->Eliminate(); 502 load->Eliminate();
503 } 503 }
504 loads.clear(); 504 loads.clear();
505 } 505 }
506 506
507 } // namespace compiler 507 } // namespace compiler
508 } // namespace internal 508 } // namespace internal
509 } // namespace v8 509 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698