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

Unified Diff: test/unittests/compiler/scheduler-unittest.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/unittests/compiler/node-test-utils.cc ('k') | test/unittests/compiler/select-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/scheduler-unittest.cc
diff --git a/test/unittests/compiler/scheduler-unittest.cc b/test/unittests/compiler/scheduler-unittest.cc
index af43b2efffaae118fa0b0b7855e742a5b807b6d0..ac508581ded83a5ef4f9e15df02f5a017f6a055a 100644
--- a/test/unittests/compiler/scheduler-unittest.cc
+++ b/test/unittests/compiler/scheduler-unittest.cc
@@ -658,7 +658,8 @@ Node* CreateDiamond(Graph* graph, CommonOperatorBuilder* common, Node* cond) {
Node* t = graph->NewNode(common->IfTrue(), br);
Node* f = graph->NewNode(common->IfFalse(), br);
Node* m = graph->NewNode(common->Merge(2), t, f);
- Node* phi = graph->NewNode(common->Phi(kMachAnyTagged, 2), tv, fv, m);
+ Node* phi =
+ graph->NewNode(common->Phi(MachineRepresentation::kTagged, 2), tv, fv, m);
return phi;
}
@@ -737,12 +738,13 @@ TARGET_TEST_F(SchedulerTest, NestedFloatingDiamonds) {
Node* m1 = graph()->NewNode(common()->Merge(2), t1, f1);
Node* ttrue = graph()->NewNode(common()->Int32Constant(1));
Node* ffalse = graph()->NewNode(common()->Int32Constant(0));
- Node* phi1 =
- graph()->NewNode(common()->Phi(kMachAnyTagged, 2), ttrue, ffalse, m1);
+ Node* phi1 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), ttrue, ffalse, m1);
Node* m = graph()->NewNode(common()->Merge(2), t, f);
- Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), fv, phi1, m);
+ Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ fv, phi1, m);
Node* ephi1 = graph()->NewNode(common()->EffectPhi(2), start, map, m);
Node* ret = graph()->NewNode(common()->Return(), phi, ephi1, start);
@@ -766,27 +768,29 @@ TARGET_TEST_F(SchedulerTest, NestedFloatingDiamondWithChain) {
Node* tA1 = graph()->NewNode(common()->IfTrue(), brA1);
Node* fA1 = graph()->NewNode(common()->IfFalse(), brA1);
Node* mA1 = graph()->NewNode(common()->Merge(2), tA1, fA1);
- Node* phiA1 = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), p0, p1, mA1);
+ Node* phiA1 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), p0, p1, mA1);
Node* brB1 = graph()->NewNode(common()->Branch(), p1, graph()->start());
Node* tB1 = graph()->NewNode(common()->IfTrue(), brB1);
Node* fB1 = graph()->NewNode(common()->IfFalse(), brB1);
Node* mB1 = graph()->NewNode(common()->Merge(2), tB1, fB1);
- Node* phiB1 = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), p0, p1, mB1);
+ Node* phiB1 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), p0, p1, mB1);
Node* brA2 = graph()->NewNode(common()->Branch(), phiB1, mA1);
Node* tA2 = graph()->NewNode(common()->IfTrue(), brA2);
Node* fA2 = graph()->NewNode(common()->IfFalse(), brA2);
Node* mA2 = graph()->NewNode(common()->Merge(2), tA2, fA2);
- Node* phiA2 =
- graph()->NewNode(common()->Phi(kMachAnyTagged, 2), phiB1, c, mA2);
+ Node* phiA2 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), phiB1, c, mA2);
Node* brB2 = graph()->NewNode(common()->Branch(), phiA1, mB1);
Node* tB2 = graph()->NewNode(common()->IfTrue(), brB2);
Node* fB2 = graph()->NewNode(common()->IfFalse(), brB2);
Node* mB2 = graph()->NewNode(common()->Merge(2), tB2, fB2);
- Node* phiB2 =
- graph()->NewNode(common()->Phi(kMachAnyTagged, 2), phiA1, c, mB2);
+ Node* phiB2 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), phiA1, c, mB2);
Node* add = graph()->NewNode(&kIntAdd, phiA2, phiB2);
Node* ret = graph()->NewNode(common()->Return(), add, start, start);
@@ -810,7 +814,8 @@ TARGET_TEST_F(SchedulerTest, NestedFloatingDiamondWithLoop) {
Node* f = graph()->NewNode(common()->IfFalse(), br);
Node* loop = graph()->NewNode(common()->Loop(2), f, start);
- Node* ind = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), p0, p0, loop);
+ Node* ind = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ p0, p0, loop);
Node* add = graph()->NewNode(&kIntAdd, ind, fv);
Node* br1 = graph()->NewNode(common()->Branch(), add, loop);
@@ -821,7 +826,8 @@ TARGET_TEST_F(SchedulerTest, NestedFloatingDiamondWithLoop) {
ind->ReplaceInput(1, ind); // close induction variable.
Node* m = graph()->NewNode(common()->Merge(2), t, f1);
- Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), fv, ind, m);
+ Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ fv, ind, m);
Node* ret = graph()->NewNode(common()->Return(), phi, start, start);
Node* end = graph()->NewNode(common()->End(1), ret);
@@ -840,7 +846,8 @@ TARGET_TEST_F(SchedulerTest, LoopedFloatingDiamond1) {
Node* c = graph()->NewNode(common()->Int32Constant(7));
Node* loop = graph()->NewNode(common()->Loop(2), start, start);
- Node* ind = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), p0, p0, loop);
+ Node* ind = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ p0, p0, loop);
Node* add = graph()->NewNode(&kIntAdd, ind, c);
Node* br = graph()->NewNode(common()->Branch(), add, loop);
@@ -851,7 +858,8 @@ TARGET_TEST_F(SchedulerTest, LoopedFloatingDiamond1) {
Node* t1 = graph()->NewNode(common()->IfTrue(), br1);
Node* f1 = graph()->NewNode(common()->IfFalse(), br1);
Node* m1 = graph()->NewNode(common()->Merge(2), t1, f1);
- Node* phi1 = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), add, p0, m1);
+ Node* phi1 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), add, p0, m1);
loop->ReplaceInput(1, t); // close loop.
ind->ReplaceInput(1, phi1); // close induction variable.
@@ -873,13 +881,15 @@ TARGET_TEST_F(SchedulerTest, LoopedFloatingDiamond2) {
Node* c = graph()->NewNode(common()->Int32Constant(7));
Node* loop = graph()->NewNode(common()->Loop(2), start, start);
- Node* ind = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), p0, p0, loop);
+ Node* ind = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ p0, p0, loop);
Node* br1 = graph()->NewNode(common()->Branch(), p0, graph()->start());
Node* t1 = graph()->NewNode(common()->IfTrue(), br1);
Node* f1 = graph()->NewNode(common()->IfFalse(), br1);
Node* m1 = graph()->NewNode(common()->Merge(2), t1, f1);
- Node* phi1 = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), c, ind, m1);
+ Node* phi1 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), c, ind, m1);
Node* add = graph()->NewNode(&kIntAdd, ind, phi1);
@@ -907,14 +917,16 @@ TARGET_TEST_F(SchedulerTest, LoopedFloatingDiamond3) {
Node* c = graph()->NewNode(common()->Int32Constant(7));
Node* loop = graph()->NewNode(common()->Loop(2), start, start);
- Node* ind = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), p0, p0, loop);
+ Node* ind = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ p0, p0, loop);
Node* br1 = graph()->NewNode(common()->Branch(), p0, graph()->start());
Node* t1 = graph()->NewNode(common()->IfTrue(), br1);
Node* f1 = graph()->NewNode(common()->IfFalse(), br1);
Node* loop1 = graph()->NewNode(common()->Loop(2), t1, start);
- Node* ind1 = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), p0, p0, loop);
+ Node* ind1 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), p0, p0, loop);
Node* add1 = graph()->NewNode(&kIntAdd, ind1, c);
Node* br2 = graph()->NewNode(common()->Branch(), add1, loop1);
@@ -925,7 +937,8 @@ TARGET_TEST_F(SchedulerTest, LoopedFloatingDiamond3) {
ind1->ReplaceInput(1, ind1); // close inner induction variable.
Node* m1 = graph()->NewNode(common()->Merge(2), f1, f2);
- Node* phi1 = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), c, ind1, m1);
+ Node* phi1 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), c, ind1, m1);
Node* add = graph()->NewNode(&kIntAdd, ind, phi1);
@@ -960,15 +973,17 @@ TARGET_TEST_F(SchedulerTest, PhisPushedDownToDifferentBranches) {
Node* t = graph()->NewNode(common()->IfTrue(), br);
Node* f = graph()->NewNode(common()->IfFalse(), br);
Node* m = graph()->NewNode(common()->Merge(2), t, f);
- Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), v1, v2, m);
- Node* phi2 = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), v3, v4, m);
+ Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ v1, v2, m);
+ Node* phi2 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), v3, v4, m);
Node* br2 = graph()->NewNode(common()->Branch(), p1, graph()->start());
Node* t2 = graph()->NewNode(common()->IfTrue(), br2);
Node* f2 = graph()->NewNode(common()->IfFalse(), br2);
Node* m2 = graph()->NewNode(common()->Merge(2), t2, f2);
- Node* phi3 =
- graph()->NewNode(common()->Phi(kMachAnyTagged, 2), phi, phi2, m2);
+ Node* phi3 = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kTagged, 2), phi, phi2, m2);
Node* ret = graph()->NewNode(common()->Return(), phi3, start, start);
Node* end = graph()->NewNode(common()->End(1), ret);
@@ -990,7 +1005,8 @@ TARGET_TEST_F(SchedulerTest, BranchHintTrue) {
Node* t = graph()->NewNode(common()->IfTrue(), br);
Node* f = graph()->NewNode(common()->IfFalse(), br);
Node* m = graph()->NewNode(common()->Merge(2), t, f);
- Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), tv, fv, m);
+ Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ tv, fv, m);
Node* ret = graph()->NewNode(common()->Return(), phi, start, start);
Node* end = graph()->NewNode(common()->End(1), ret);
@@ -1014,7 +1030,8 @@ TARGET_TEST_F(SchedulerTest, BranchHintFalse) {
Node* t = graph()->NewNode(common()->IfTrue(), br);
Node* f = graph()->NewNode(common()->IfFalse(), br);
Node* m = graph()->NewNode(common()->Merge(2), t, f);
- Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), tv, fv, m);
+ Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ tv, fv, m);
Node* ret = graph()->NewNode(common()->Return(), phi, start, start);
Node* end = graph()->NewNode(common()->End(1), ret);
@@ -1042,7 +1059,8 @@ TARGET_TEST_F(SchedulerTest, CallException) {
common()->IfException(IfExceptionHint::kLocallyUncaught), c2, c2);
Node* hdl = graph()->NewNode(common()->Merge(2), ex1, ex2);
Node* m = graph()->NewNode(common()->Merge(2), ok2, hdl);
- Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), c2, p0, m);
+ Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ c2, p0, m);
Node* ret = graph()->NewNode(common()->Return(), phi, start, m);
Node* end = graph()->NewNode(common()->End(1), ret);
@@ -1084,7 +1102,8 @@ TARGET_TEST_F(SchedulerTest, Switch) {
Node* d = graph()->NewNode(common()->IfDefault(), sw);
Node* vd = graph()->NewNode(common()->Int32Constant(33));
Node* m = graph()->NewNode(common()->Merge(3), c0, c1, d);
- Node* phi = graph()->NewNode(common()->Phi(kMachInt32, 3), v0, v1, vd, m);
+ Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kWord32, 3),
+ v0, v1, vd, m);
Node* ret = graph()->NewNode(common()->Return(), phi, start, m);
Node* end = graph()->NewNode(common()->End(1), ret);
@@ -1107,7 +1126,8 @@ TARGET_TEST_F(SchedulerTest, FloatingSwitch) {
Node* d = graph()->NewNode(common()->IfDefault(), sw);
Node* vd = graph()->NewNode(common()->Int32Constant(33));
Node* m = graph()->NewNode(common()->Merge(3), c0, c1, d);
- Node* phi = graph()->NewNode(common()->Phi(kMachInt32, 3), v0, v1, vd, m);
+ Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kWord32, 3),
+ v0, v1, vd, m);
Node* ret = graph()->NewNode(common()->Return(), phi, start, start);
Node* end = graph()->NewNode(common()->End(1), ret);
« no previous file with comments | « test/unittests/compiler/node-test-utils.cc ('k') | test/unittests/compiler/select-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698