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

Side by Side Diff: src/compiler/representation-change.cc

Issue 1580353003: [turbofan] Avoid using the typer's types in representation inference for phis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove dead code Created 4 years, 11 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
« no previous file with comments | « no previous file | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/representation-change.h" 5 #include "src/compiler/representation-change.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 Truncation::TruncationKind Truncation::Generalize(TruncationKind rep1, 57 Truncation::TruncationKind Truncation::Generalize(TruncationKind rep1,
58 TruncationKind rep2) { 58 TruncationKind rep2) {
59 if (LessGeneral(rep1, rep2)) return rep2; 59 if (LessGeneral(rep1, rep2)) return rep2;
60 if (LessGeneral(rep2, rep1)) return rep1; 60 if (LessGeneral(rep2, rep1)) return rep1;
61 // Handle the generalization of float64-representable values. 61 // Handle the generalization of float64-representable values.
62 if (LessGeneral(rep1, TruncationKind::kFloat64) && 62 if (LessGeneral(rep1, TruncationKind::kFloat64) &&
63 LessGeneral(rep2, TruncationKind::kFloat64)) { 63 LessGeneral(rep2, TruncationKind::kFloat64)) {
64 return TruncationKind::kFloat64; 64 return TruncationKind::kFloat64;
65 } 65 }
66 // All other combinations are illegal. 66 // All other combinations are illegal.
67 FATAL("Tried to combine incompatible representations"); 67 FATAL("Tried to combine incompatible truncations");
68 return TruncationKind::kNone; 68 return TruncationKind::kNone;
69 } 69 }
70 70
71 71
72 // static 72 // static
73 bool Truncation::LessGeneral(TruncationKind rep1, TruncationKind rep2) { 73 bool Truncation::LessGeneral(TruncationKind rep1, TruncationKind rep2) {
74 switch (rep1) { 74 switch (rep1) {
75 case TruncationKind::kNone: 75 case TruncationKind::kNone:
76 return true; 76 return true;
77 case TruncationKind::kBool: 77 case TruncationKind::kBool:
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 528
529 529
530 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { 530 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) {
531 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), 531 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(),
532 node); 532 node);
533 } 533 }
534 534
535 } // namespace compiler 535 } // namespace compiler
536 } // namespace internal 536 } // namespace internal
537 } // namespace v8 537 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698