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

Side by Side Diff: src/compiler/instruction.cc

Issue 2086653003: [Turbofan] Add the concept of aliasing to RegisterConfiguration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 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
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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/instruction.h" 7 #include "src/compiler/instruction.h"
8 #include "src/compiler/schedule.h" 8 #include "src/compiler/schedule.h"
9 #include "src/compiler/state-values-utils.h" 9 #include "src/compiler/state-values-utils.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 case kUnorderedEqual: 54 case kUnorderedEqual:
55 case kUnorderedNotEqual: 55 case kUnorderedNotEqual:
56 return condition; 56 return condition;
57 } 57 }
58 UNREACHABLE(); 58 UNREACHABLE();
59 return condition; 59 return condition;
60 } 60 }
61 61
62 bool InstructionOperand::InterferesWith(const InstructionOperand& that) const { 62 bool InstructionOperand::InterferesWith(const InstructionOperand& that) const {
63 if (!IsFPRegister() || !that.IsFPRegister()) return EqualsCanonicalized(that); 63 if (!IsFPRegister() || !that.IsFPRegister()) return EqualsCanonicalized(that);
64 return LocationOperand::cast(this)->register_code() == 64
65 LocationOperand::cast(that).register_code(); 65 const LocationOperand& loc1 = *LocationOperand::cast(this);
66 const LocationOperand& loc2 = LocationOperand::cast(that);
67 const RegisterConfiguration* config =
68 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN);
69 if (config->fp_aliasing_kind() != RegisterConfiguration::COMBINE)
70 return loc1.register_code() == loc2.register_code();
71
72 return config->AreAliases(loc1.representation(), loc1.register_code(),
73 loc2.representation(), loc2.register_code());
66 } 74 }
67 75
68 void InstructionOperand::Print(const RegisterConfiguration* config) const { 76 void InstructionOperand::Print(const RegisterConfiguration* config) const {
69 OFStream os(stdout); 77 OFStream os(stdout);
70 PrintableInstructionOperand wrapper; 78 PrintableInstructionOperand wrapper;
71 wrapper.register_configuration_ = config; 79 wrapper.register_configuration_ = config;
72 wrapper.op_ = *this; 80 wrapper.op_ = *this;
73 os << wrapper << std::endl; 81 os << wrapper << std::endl;
74 } 82 }
75 83
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 } 1043 }
1036 for (int i = 0; i < code.InstructionBlockCount(); i++) { 1044 for (int i = 0; i < code.InstructionBlockCount(); i++) {
1037 printable.sequence_->PrintBlock(printable.register_configuration_, i); 1045 printable.sequence_->PrintBlock(printable.register_configuration_, i);
1038 } 1046 }
1039 return os; 1047 return os;
1040 } 1048 }
1041 1049
1042 } // namespace compiler 1050 } // namespace compiler
1043 } // namespace internal 1051 } // namespace internal
1044 } // namespace v8 1052 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698