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

Unified Diff: src/compiler/instruction.h

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, 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
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index af7e592e5f93c4a0596c3c6d7b280c3160faca15..7130c3d53f3b9ea07a97aa9bf811506465037622 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -606,10 +606,17 @@ bool InstructionOperand::IsSimd128StackSlot() const {
uint64_t InstructionOperand::GetCanonicalizedValue() const {
if (IsAllocated() || IsExplicit()) {
MachineRepresentation rep = LocationOperand::cast(this)->representation();
- // Preserve FP representation so we can check for interference on
- // architectures with complex register aliasing.
- MachineRepresentation canonical =
- IsFPRegister() ? rep : MachineRepresentation::kNone;
+ MachineRepresentation canonical = MachineRepresentation::kNone;
+ if (IsFloatingPoint(rep)) {
+ if (kSimpleFPAliasing) {
+ // Archs with simple aliasing can treat all FP operands the same.
+ canonical = MachineRepresentation::kFloat64;
+ } else {
+ // We need to distinguish FP operands of different reps when FP
+ // aliasing is not simple (e.g. ARM).
+ canonical = rep;
+ }
+ }
return InstructionOperand::KindField::update(
LocationOperand::RepresentationField::update(this->value_, canonical),
LocationOperand::EXPLICIT);
@@ -617,7 +624,6 @@ uint64_t InstructionOperand::GetCanonicalizedValue() const {
return this->value_;
}
-
// Required for maps that don't care about machine type.
struct CompareOperandModuloType {
bool operator()(const InstructionOperand& a,
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698