Reviewers: jarin, Michael Starzinger,

Description:
[turbofan] Proper dead code elimination as regular reducer.

The three different concerns that the ControlReducer used to deal with
are now properly separated into

  a.) DeadCodeElimination, which is a regular AdvancedReducer, that
      propagates Dead via control edges,
  b.) CommonOperatorReducer, which does strength reduction on common
      operators (i.e. Branch, Phi, and friends), and
  c.) GraphTrimming, which removes dead->live edges from the graph.

This will make it possible to run the DeadCodeElimination together with
other passes that actually introduce Dead nodes, i.e. typed lowering;
and it opens the door for general inlining without two stage fix point
iteration.

To make the DeadCodeElimination easier and more uniform, we basically
reverted the introduction of DeadValue and DeadEffect, and changed the
Dead operator to produce control, value and effect. Note however that
this is not a requirement, but merely a way to make dead propagation
easier and more uniform. We could always go back and decide to have
different Dead operators if some other change requires that.

Note that there are several additional opportunities for cleanup now,
i.e. OSR deconstruction could be a regular reducer now, and we don't
need to use TheHole as dead value marker in the GraphReducer. And we can
actually run the dead code elimination together with the other passes
instead of using separate passes over the graph.  We will do this in
follow up CLs.

[email protected], [email protected]

Please review this at https://codereview.chromium.org/1193833002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+941, -1701 lines):
  M BUILD.gn
  M src/compiler/ast-graph-builder.h
  M src/compiler/ast-graph-builder.cc
  M src/compiler/common-operator.h
  M src/compiler/common-operator.cc
  M src/compiler/common-operator-reducer.h
  M src/compiler/common-operator-reducer.cc
  D src/compiler/control-reducer.h
  D src/compiler/control-reducer.cc
  A src/compiler/dead-code-elimination.h
  A src/compiler/dead-code-elimination.cc
  M src/compiler/graph-visualizer.cc
  M src/compiler/js-graph.h
  M src/compiler/js-graph.cc
  M src/compiler/js-inlining.cc
  M src/compiler/loop-peeling.cc
  M src/compiler/opcodes.h
  M src/compiler/operator-properties.cc
  M src/compiler/osr.cc
  M src/compiler/pipeline.cc
  M src/compiler/simplified-lowering.cc
  M src/compiler/typer.cc
  M src/compiler/verifier.cc
  M test/cctest/cctest.gyp
  D test/cctest/compiler/test-control-reducer.cc
  M test/cctest/compiler/test-loop-analysis.cc
  M test/unittests/compiler/common-operator-reducer-unittest.cc
  M test/unittests/compiler/common-operator-unittest.cc
  D test/unittests/compiler/control-reducer-unittest.cc
  A test/unittests/compiler/dead-code-elimination-unittest.cc
  M test/unittests/compiler/graph-reducer-unittest.cc
  M test/unittests/compiler/graph-trimmer-unittest.cc
  M test/unittests/compiler/node-properties-unittest.cc
  M test/unittests/compiler/node-test-utils.h
  M test/unittests/compiler/node-test-utils.cc
  M test/unittests/unittests.gyp
  M tools/gyp/v8.gyp


--
--
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.

Reply via email to