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
parent 24f7a70d
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "src/compiler/js-context-specialization.h" #include "src/compiler/js-context-specialization.h"
#include "src/compiler/js-generic-lowering.h" #include "src/compiler/js-generic-lowering.h"
#include "src/compiler/js-typed-lowering.h" #include "src/compiler/js-typed-lowering.h"
#include "src/compiler/phi-reducer.h"
#include "src/compiler/register-allocator.h" #include "src/compiler/register-allocator.h"
#include "src/compiler/schedule.h" #include "src/compiler/schedule.h"
#include "src/compiler/scheduler.h" #include "src/compiler/scheduler.h"
...@@ -144,6 +145,17 @@ Handle<Code> Pipeline::GenerateCode() { ...@@ -144,6 +145,17 @@ Handle<Code> Pipeline::GenerateCode() {
graph_builder.CreateGraph(); graph_builder.CreateGraph();
context_node = graph_builder.GetFunctionContext(); 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"); VerifyAndPrintGraph(&graph, "Initial untyped");
......
...@@ -25,14 +25,11 @@ ...@@ -25,14 +25,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ [
[ALWAYS, { [ALWAYS, {
# Too slow in Debug mode. TODO(mstarzinger): Too slow for TF. # Too slow in Debug mode.
'octane/mandreel': [PASS, NO_VARIANTS, ['mode == debug', SKIP]], 'octane/mandreel': [PASS, ['mode == debug', SKIP]],
# TODO(mstarzinger,ishell): Timeout with TF in predictable mode. # TODO(mstarzinger,ishell): Timeout with TF in predictable mode.
'octane/richards': [PASS, NO_VARIANTS], 'octane/richards': [PASS, NO_VARIANTS],
# TODO(mstarzinger): Out of mem with TF.
'octane/zlib': [PASS, NO_VARIANTS],
}], # ALWAYS }], # ALWAYS
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment