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

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

Issue 1168693002: [turbofan] Allow ReplaceWithValue to kill control. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 6 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
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/graph-reducer.h" 10 #include "src/compiler/graph-reducer.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 typer.Run(); 53 typer.Run();
54 lowering.LowerAllNodes(); 54 lowering.LowerAllNodes();
55 } 55 }
56 56
57 void LowerAllNodesAndLowerChanges() { 57 void LowerAllNodesAndLowerChanges() {
58 this->End(); 58 this->End();
59 typer.Run(); 59 typer.Run();
60 lowering.LowerAllNodes(); 60 lowering.LowerAllNodes();
61 61
62 ChangeLowering lowering(&jsgraph); 62 ChangeLowering lowering(&jsgraph);
63 GraphReducer reducer(this->graph(), this->zone()); 63 GraphReducer reducer(this->zone(), this->graph());
64 reducer.AddReducer(&lowering); 64 reducer.AddReducer(&lowering);
65 reducer.ReduceGraph(); 65 reducer.ReduceGraph();
66 Verifier::Run(this->graph()); 66 Verifier::Run(this->graph());
67 } 67 }
68 68
69 void CheckNumberCall(double expected, double input) { 69 void CheckNumberCall(double expected, double input) {
70 // TODO(titzer): make calls to NewNumber work in cctests. 70 // TODO(titzer): make calls to NewNumber work in cctests.
71 if (expected <= Smi::kMinValue) return; 71 if (expected <= Smi::kMinValue) return;
72 if (expected >= Smi::kMaxValue) return; 72 if (expected >= Smi::kMaxValue) return;
73 Handle<Object> num = factory()->NewNumber(input); 73 Handle<Object> num = factory()->NewNumber(input);
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2086 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); 2086 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z);
2087 NodeProperties::SetBounds(phi, phi_bounds); 2087 NodeProperties::SetBounds(phi, phi_bounds);
2088 2088
2089 Node* use = t.Use(phi, d.use); 2089 Node* use = t.Use(phi, d.use);
2090 t.Return(use); 2090 t.Return(use);
2091 t.Lower(); 2091 t.Lower();
2092 2092
2093 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); 2093 CHECK_EQ(d.expected, OpParameter<MachineType>(phi));
2094 } 2094 }
2095 } 2095 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-jsexceptions.cc ('k') | test/unittests/compiler/graph-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698