Reviewers: jarin,
Description:
[turbofan] Run value numbering after SimplifiedLowering.
Running ValueNumberingReducer together with ChangeLowering causes
trouble with the current GraphReducer and makes GVN ineffective, so
running it before we get to change lowering works around that well-known
(phase ordering) problem for now.
[email protected]
Please review this at https://codereview.chromium.org/660733003/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+6, -2 lines):
M src/compiler/pipeline.cc
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index
369f97d815d57fad93631aacbcb6d2f5c1610d35..707d88757c698435a41aadee3738f6c73ed619d1
100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -316,6 +316,12 @@ Handle<Code> Pipeline::GenerateCode() {
SourcePosition::Unknown());
SimplifiedLowering lowering(&jsgraph);
lowering.LowerAllNodes();
+ ValueNumberingReducer vn_reducer(zone());
+ SimplifiedOperatorReducer simple_reducer(&jsgraph);
+ GraphReducer graph_reducer(&graph);
+ graph_reducer.AddReducer(&simple_reducer);
+ graph_reducer.AddReducer(&vn_reducer);
+ graph_reducer.ReduceGraph();
VerifyAndPrintGraph(&graph, "Lowered simplified");
}
@@ -327,13 +333,11 @@ Handle<Code> Pipeline::GenerateCode() {
SourcePosition::Unknown());
Linkage linkage(info());
ValueNumberingReducer vn_reducer(zone());
- SimplifiedOperatorReducer simple_reducer(&jsgraph);
ChangeLowering lowering(&jsgraph, &linkage);
MachineOperatorReducer mach_reducer(&jsgraph);
GraphReducer graph_reducer(&graph);
// TODO(titzer): Figure out if we should run all reducers at once
here.
graph_reducer.AddReducer(&vn_reducer);
- graph_reducer.AddReducer(&simple_reducer);
graph_reducer.AddReducer(&lowering);
graph_reducer.AddReducer(&mach_reducer);
graph_reducer.ReduceGraph();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.