From b84dc47259a1107d08691a789c75cd8cff57dfeb Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Tue, 12 Aug 2014 12:30:22 +0000 Subject: [PATCH] Reduce redundant phi nodes after graph building. R=titzer@chromium.org Review URL: https://codereview.chromium.org/461003002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/compiler/pipeline.cc | 12 ++++++++++++ test/benchmarks/benchmarks.status | 7 ++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc index fa0ff173b2..2ea840c58e 100644 --- a/src/compiler/pipeline.cc +++ b/src/compiler/pipeline.cc @@ -14,6 +14,7 @@ #include "src/compiler/js-context-specialization.h" #include "src/compiler/js-generic-lowering.h" #include "src/compiler/js-typed-lowering.h" +#include "src/compiler/phi-reducer.h" #include "src/compiler/register-allocator.h" #include "src/compiler/schedule.h" #include "src/compiler/scheduler.h" @@ -144,6 +145,17 @@ Handle Pipeline::GenerateCode() { graph_builder.CreateGraph(); context_node = graph_builder.GetFunctionContext(); } + { + PhaseStats phi_reducer_stats(info(), PhaseStats::CREATE_GRAPH, + "phi reduction"); + PhiReducer phi_reducer; + GraphReducer graph_reducer(&graph); + graph_reducer.AddReducer(&phi_reducer); + graph_reducer.ReduceGraph(); + // TODO(mstarzinger): Running reducer once ought to be enough for everyone. + graph_reducer.ReduceGraph(); + graph_reducer.ReduceGraph(); + } VerifyAndPrintGraph(&graph, "Initial untyped"); diff --git a/test/benchmarks/benchmarks.status b/test/benchmarks/benchmarks.status index 8dab238b18..1afd5eca24 100644 --- a/test/benchmarks/benchmarks.status +++ b/test/benchmarks/benchmarks.status @@ -25,14 +25,11 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - [ [ALWAYS, { - # Too slow in Debug mode. TODO(mstarzinger): Too slow for TF. - 'octane/mandreel': [PASS, NO_VARIANTS, ['mode == debug', SKIP]], + # Too slow in Debug mode. + 'octane/mandreel': [PASS, ['mode == debug', SKIP]], # TODO(mstarzinger,ishell): Timeout with TF in predictable mode. 'octane/richards': [PASS, NO_VARIANTS], - # TODO(mstarzinger): Out of mem with TF. - 'octane/zlib': [PASS, NO_VARIANTS], }], # ALWAYS ]