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

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: Fix inactive live range population. 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);
Mircea Trofin 2016/06/22 06:07:34 I'd move this method to LocationOperand and change
bbudge 2016/06/22 20:16:03 I agree it doesn't feel natural for this to be on
66 const LocationOperand& loc2 = LocationOperand::cast(that);
67 const RegisterConfiguration* config =
68 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN);
Mircea Trofin 2016/06/22 06:07:34 Why force the configuration to TURBOFAN? How do un
bbudge 2016/06/22 20:16:04 We want the global register configuration for Turb
Mircea Trofin 2016/06/22 21:37:37 Not super sure I understand. Are you saying that a
bbudge 2016/06/22 21:51:13 Outside of tests we should use either the 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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 } 1040 }
1033 for (int i = 0; i < code.InstructionBlockCount(); i++) { 1041 for (int i = 0; i < code.InstructionBlockCount(); i++) {
1034 printable.sequence_->PrintBlock(printable.register_configuration_, i); 1042 printable.sequence_->PrintBlock(printable.register_configuration_, i);
1035 } 1043 }
1036 return os; 1044 return os;
1037 } 1045 }
1038 1046
1039 } // namespace compiler 1047 } // namespace compiler
1040 } // namespace internal 1048 } // namespace internal
1041 } // namespace v8 1049 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698