[turbofan] Connect loops to end via Terminate during graph building.
authorbmeurer <bmeurer@chromium.org>
Tue, 26 May 2015 12:17:57 +0000 (05:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 26 May 2015 12:18:07 +0000 (12:18 +0000)
commitf6fb5eb19796736cb414840652c9868693a5775a
tree6bd81809d409ae398f2b70715e6f4545546e2230
parent3c13e81721d60120e5fbc54c4bb77fc980381faa
[turbofan] Connect loops to end via Terminate during graph building.

This way we don't need to connect (potentially) non-terminating loops
later during control reduction, which saves one forward pass over the
control graph.  Long term we will move the trimming functionality of
the control reducer to the GraphReducer, and get rid of the Finish
method again.

As a bonus, this change also properly rewires Terminate, Throw and
Deoptimize during inlining.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/1155683004

Cr-Commit-Position: refs/heads/master@{#28625}
src/compiler/ast-graph-builder.cc
src/compiler/common-operator.cc
src/compiler/control-reducer.cc
src/compiler/js-inlining.cc
test/cctest/compiler/test-control-reducer.cc
test/unittests/compiler/common-operator-unittest.cc
test/unittests/compiler/control-reducer-unittest.cc