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

Unified Diff: test/cctest/compiler/test-loop-analysis.cc

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years 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 | « test/cctest/compiler/test-jump-threading.cc ('k') | test/cctest/compiler/test-machine-operator-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-loop-analysis.cc
diff --git a/test/cctest/compiler/test-loop-analysis.cc b/test/cctest/compiler/test-loop-analysis.cc
index 40c413042b7f1d8b2e273c7cdd3e98d7c14c596c..68bfc2858ff430aff96d553a2056f755eb8a1594 100644
--- a/test/cctest/compiler/test-loop-analysis.cc
+++ b/test/cctest/compiler/test-loop-analysis.cc
@@ -111,7 +111,8 @@ class LoopFinderTester : HandleAndZoneScope {
}
const Operator* op(int count, bool effect) {
- return effect ? common.EffectPhi(count) : common.Phi(kMachAnyTagged, count);
+ return effect ? common.EffectPhi(count)
+ : common.Phi(MachineRepresentation::kTagged, count);
}
Node* Return(Node* val, Node* effect, Node* control) {
@@ -266,8 +267,8 @@ TEST(LaLoop1phi) {
// One loop with a simple phi.
LoopFinderTester t;
While w(t, t.p0);
- Node* phi =
- t.graph.NewNode(t.common.Phi(kMachAnyTagged, 2), t.zero, t.one, w.loop);
+ Node* phi = t.graph.NewNode(t.common.Phi(MachineRepresentation::kTagged, 2),
+ t.zero, t.one, w.loop);
t.Return(phi, t.start, w.exit);
Node* chain[] = {w.loop};
@@ -475,7 +476,7 @@ TEST(LaNestedLoop1x) {
While w2(t, t.p0);
w2.nest(w1);
- const Operator* op = t.common.Phi(kMachInt32, 2);
+ const Operator* op = t.common.Phi(MachineRepresentation::kWord32, 2);
Node* p1a = t.graph.NewNode(op, t.p0, t.p0, w1.loop);
Node* p1b = t.graph.NewNode(op, t.p0, t.p0, w1.loop);
Node* p2a = t.graph.NewNode(op, p1a, t.p0, w2.loop);
@@ -688,8 +689,8 @@ TEST(LaEdgeMatrix1) {
Node* p3 = t.jsgraph.Int32Constant(33);
Node* loop = t.graph.NewNode(t.common.Loop(2), t.start, t.start);
- Node* phi =
- t.graph.NewNode(t.common.Phi(kMachInt32, 2), t.one, p1, loop);
+ Node* phi = t.graph.NewNode(
+ t.common.Phi(MachineRepresentation::kWord32, 2), t.one, p1, loop);
Node* cond = t.graph.NewNode(&kIntAdd, phi, p2);
Node* branch = t.graph.NewNode(t.common.Branch(), cond, loop);
Node* if_true = t.graph.NewNode(t.common.IfTrue(), branch);
@@ -724,8 +725,8 @@ void RunEdgeMatrix2(int i) {
// outer loop.
Node* loop1 = t.graph.NewNode(t.common.Loop(2), t.start, t.start);
- Node* phi1 =
- t.graph.NewNode(t.common.Phi(kMachInt32, 2), t.one, p1, loop1);
+ Node* phi1 = t.graph.NewNode(
+ t.common.Phi(MachineRepresentation::kWord32, 2), t.one, p1, loop1);
Node* cond1 = t.graph.NewNode(&kIntAdd, phi1, t.one);
Node* branch1 = t.graph.NewNode(t.common.Branch(), cond1, loop1);
Node* if_true1 = t.graph.NewNode(t.common.IfTrue(), branch1);
@@ -733,8 +734,8 @@ void RunEdgeMatrix2(int i) {
// inner loop.
Node* loop2 = t.graph.NewNode(t.common.Loop(2), if_true1, t.start);
- Node* phi2 =
- t.graph.NewNode(t.common.Phi(kMachInt32, 2), t.one, p2, loop2);
+ Node* phi2 = t.graph.NewNode(
+ t.common.Phi(MachineRepresentation::kWord32, 2), t.one, p2, loop2);
Node* cond2 = t.graph.NewNode(&kIntAdd, phi2, p3);
Node* branch2 = t.graph.NewNode(t.common.Branch(), cond2, loop2);
Node* if_true2 = t.graph.NewNode(t.common.IfTrue(), branch2);
@@ -800,7 +801,8 @@ void RunEdgeMatrix3(int c1a, int c1b, int c1c, // line break
// L1 depth = 0
Node* loop1 = t.graph.NewNode(t.common.Loop(2), t.start, t.start);
- Node* phi1 = t.graph.NewNode(t.common.Phi(kMachInt32, 2), p1a, p1c, loop1);
+ Node* phi1 = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2),
+ p1a, p1c, loop1);
Node* cond1 = t.graph.NewNode(&kIntAdd, phi1, p1b);
Node* branch1 = t.graph.NewNode(t.common.Branch(), cond1, loop1);
Node* if_true1 = t.graph.NewNode(t.common.IfTrue(), branch1);
@@ -808,7 +810,8 @@ void RunEdgeMatrix3(int c1a, int c1b, int c1c, // line break
// L2 depth = 1
Node* loop2 = t.graph.NewNode(t.common.Loop(2), if_true1, t.start);
- Node* phi2 = t.graph.NewNode(t.common.Phi(kMachInt32, 2), p2a, p2c, loop2);
+ Node* phi2 = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2),
+ p2a, p2c, loop2);
Node* cond2 = t.graph.NewNode(&kIntAdd, phi2, p2b);
Node* branch2 = t.graph.NewNode(t.common.Branch(), cond2, loop2);
Node* if_true2 = t.graph.NewNode(t.common.IfTrue(), branch2);
@@ -816,7 +819,8 @@ void RunEdgeMatrix3(int c1a, int c1b, int c1c, // line break
// L3 depth = 2
Node* loop3 = t.graph.NewNode(t.common.Loop(2), if_true2, t.start);
- Node* phi3 = t.graph.NewNode(t.common.Phi(kMachInt32, 2), p3a, p3c, loop3);
+ Node* phi3 = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2),
+ p3a, p3c, loop3);
Node* cond3 = t.graph.NewNode(&kIntAdd, phi3, p3b);
Node* branch3 = t.graph.NewNode(t.common.Branch(), cond3, loop3);
Node* if_true3 = t.graph.NewNode(t.common.IfTrue(), branch3);
@@ -924,7 +928,8 @@ static void RunManyChainedLoops_i(int count) {
// Build loops.
for (int i = 0; i < count; i++) {
Node* loop = t.graph.NewNode(t.common.Loop(2), last, t.start);
- Node* phi = t.graph.NewNode(t.common.Phi(kMachInt32, 2), k11, k12, loop);
+ Node* phi = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2),
+ k11, k12, loop);
Node* branch = t.graph.NewNode(t.common.Branch(), phi, loop);
Node* if_true = t.graph.NewNode(t.common.IfTrue(), branch);
Node* exit = t.graph.NewNode(t.common.IfFalse(), branch);
@@ -959,7 +964,8 @@ static void RunManyNestedLoops_i(int count) {
// Build loops.
for (int i = 0; i < count; i++) {
Node* loop = t.graph.NewNode(t.common.Loop(2), entry, t.start);
- Node* phi = t.graph.NewNode(t.common.Phi(kMachInt32, 2), k11, k12, loop);
+ Node* phi = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2),
+ k11, k12, loop);
Node* branch = t.graph.NewNode(t.common.Branch(), phi, loop);
Node* if_true = t.graph.NewNode(t.common.IfTrue(), branch);
Node* exit = t.graph.NewNode(t.common.IfFalse(), branch);
« no previous file with comments | « test/cctest/compiler/test-jump-threading.cc ('k') | test/cctest/compiler/test-machine-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698