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

Side by Side Diff: test/cctest/compiler/test-simplified-lowering.cc

Issue 726513002: [turbofan] Smartify the GraphReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <limits> 5 #include <limits>
6 6
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/change-lowering.h" 8 #include "src/compiler/change-lowering.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/generic-node-inl.h" 10 #include "src/compiler/generic-node-inl.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void LowerAllNodesAndLowerChanges() { 56 void LowerAllNodesAndLowerChanges() {
57 this->End(); 57 this->End();
58 typer.Run(); 58 typer.Run();
59 lowering.LowerAllNodes(); 59 lowering.LowerAllNodes();
60 60
61 Zone* zone = this->zone(); 61 Zone* zone = this->zone();
62 CompilationInfo info(zone->isolate(), zone); 62 CompilationInfo info(zone->isolate(), zone);
63 Linkage linkage( 63 Linkage linkage(
64 zone, Linkage::GetSimplifiedCDescriptor(zone, this->machine_sig_)); 64 zone, Linkage::GetSimplifiedCDescriptor(zone, this->machine_sig_));
65 ChangeLowering lowering(&jsgraph, &linkage); 65 ChangeLowering lowering(&jsgraph, &linkage);
66 GraphReducer reducer(this->graph()); 66 GraphReducer reducer(this->graph(), this->zone());
67 reducer.AddReducer(&lowering); 67 reducer.AddReducer(&lowering);
68 reducer.ReduceGraph(); 68 reducer.ReduceGraph();
69 Verifier::Run(this->graph()); 69 Verifier::Run(this->graph());
70 } 70 }
71 71
72 void CheckNumberCall(double expected, double input) { 72 void CheckNumberCall(double expected, double input) {
73 // TODO(titzer): make calls to NewNumber work in cctests. 73 // TODO(titzer): make calls to NewNumber work in cctests.
74 if (expected <= Smi::kMinValue) return; 74 if (expected <= Smi::kMinValue) return;
75 if (expected >= Smi::kMaxValue) return; 75 if (expected >= Smi::kMaxValue) return;
76 Handle<Object> num = factory()->NewNumber(input); 76 Handle<Object> num = factory()->NewNumber(input);
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); 2046 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z);
2047 NodeProperties::SetBounds(phi, phi_bounds); 2047 NodeProperties::SetBounds(phi, phi_bounds);
2048 2048
2049 Node* use = t.Use(phi, d.use); 2049 Node* use = t.Use(phi, d.use);
2050 t.Return(use); 2050 t.Return(use);
2051 t.Lower(); 2051 t.Lower();
2052 2052
2053 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); 2053 CHECK_EQ(d.expected, OpParameter<MachineType>(phi));
2054 } 2054 }
2055 } 2055 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-graph-reducer.cc ('k') | test/unittests/compiler/graph-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698