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

Unified Diff: test/cctest/compiler/test-control-reducer.cc

Issue 934293002: [turbofan] Simply context specialization and fix for OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/cctest/compiler/test-js-context-specialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-control-reducer.cc
diff --git a/test/cctest/compiler/test-control-reducer.cc b/test/cctest/compiler/test-control-reducer.cc
index 5b71df4d22d6f7123cce7dea5df29e29387aa819..827dcfdaa82e72c6ae4a99a8a1c866ebe64b28d7 100644
--- a/test/cctest/compiler/test-control-reducer.cc
+++ b/test/cctest/compiler/test-control-reducer.cc
@@ -153,6 +153,12 @@ class ControlReducerTester : HandleAndZoneScope {
ReducePhiIterative(expect, phi); // iterative should give the same result.
}
+ // Checks one-step reduction of a phi.
+ void ReducePhiNonIterative(Node* expect, Node* phi) {
+ Node* result = ControlReducer::ReducePhiForTesting(&jsgraph, &common, phi);
+ CHECK_EQ(expect, result);
+ }
+
void ReducePhiIterative(Node* expect, Node* phi) {
p0->ReplaceInput(0, start); // hack: parameters may be trimmed.
Node* ret = graph.NewNode(common.Return(), phi, start, start);
@@ -484,10 +490,10 @@ TEST(CReducePhi2_dead) {
for (size_t i = 1; i < kNumLeafs; i++) {
Node* a = R.leaf[i], *b = R.leaf[0];
Node* phi1 = R.Phi(b, a, R.dead);
- R.ReducePhi(phi1, phi1);
+ R.ReducePhiNonIterative(phi1, phi1);
Node* phi2 = R.Phi(a, b, R.dead);
- R.ReducePhi(phi2, phi2);
+ R.ReducePhiNonIterative(phi2, phi2);
}
}
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/cctest/compiler/test-js-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698