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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/instruction.cc
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
index 8f12efe7cb11458e29915df89aff3559e86187b1..ad00b7bc314105521435aa483899d918fc6c0ed7 100644
--- a/src/compiler/instruction.cc
+++ b/src/compiler/instruction.cc
@@ -61,8 +61,16 @@ FlagsCondition CommuteFlagsCondition(FlagsCondition condition) {
bool InstructionOperand::InterferesWith(const InstructionOperand& that) const {
if (!IsFPRegister() || !that.IsFPRegister()) return EqualsCanonicalized(that);
- return LocationOperand::cast(this)->register_code() ==
- LocationOperand::cast(that).register_code();
+
+ 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
+ const LocationOperand& loc2 = LocationOperand::cast(that);
+ const RegisterConfiguration* config =
+ 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
+ if (config->fp_aliasing_kind() != RegisterConfiguration::COMBINE)
+ return loc1.register_code() == loc2.register_code();
+
+ return config->AreAliases(loc1.representation(), loc1.register_code(),
+ loc2.representation(), loc2.register_code());
}
void InstructionOperand::Print(const RegisterConfiguration* config) const {

Powered by Google App Engine
This is Rietveld 408576698