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

Unified Diff: src/compiler/simplified-lowering.cc

Issue 1467193002: [turbofan] Simplify representations selection for phi. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index b335389729ae8daabf6e5d6082874edcd6e51c2a..c6dce197dc7453baa98602ba8ecc7025bd7a473e 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -447,26 +447,12 @@ class RepresentationSelector {
static MachineType GetRepresentationForPhi(Node* node, MachineTypeUnion use) {
// Phis adapt to the output representation their uses demand.
Type* upper = NodeProperties::GetType(node);
- if ((use & kRepMask) == kRepFloat32) {
- // only float32 uses.
- return kRepFloat32;
- } else if ((use & kRepMask) == kRepFloat64) {
- // only float64 uses.
- return kRepFloat64;
- } else if ((use & kRepMask) == kRepTagged) {
- // only tagged uses.
- return kRepTagged;
- } else if (upper->Is(Type::Integral32())) {
- // Integer within [-2^31, 2^32[ range.
- if (upper->Is(Type::Signed32()) || upper->Is(Type::Unsigned32())) {
- // multiple uses, but we are within 32 bits range => pick kRepWord32.
- return kRepWord32;
- } else if (!CanObserveNonWord32(use)) {
- // We only use 32 bits.
- return kRepWord32;
- } else {
- return kRepFloat64;
- }
+ if (upper->Is(Type::Signed32()) || upper->Is(Type::Unsigned32())) {
+ // We are within 32 bits range => pick kRepWord32.
+ return kRepWord32;
+ } else if (!CanObserveNonWord32(use)) {
+ // We only use 32 bits.
+ return kRepWord32;
} else if (upper->Is(Type::Boolean())) {
// multiple uses => pick kRepBit.
return kRepBit;
« no previous file with comments | « no previous file | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698