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

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: 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 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 747c14c5ca5853746e83b28bcf29de4af290c0b6..d3459284955e2b99d3753cfd99075af52446f740 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);
+ const LocationOperand& loc2 = LocationOperand::cast(that);
+ const RegisterConfiguration* config =
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::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