[pypy-svn] r21176 - pypy/dist/pypy/translator/backendopt
ericvrp at codespeak.net
ericvrp at codespeak.net
Thu Dec 15 15:26:51 CET 2005
Author: ericvrp
Date: Thu Dec 15 15:26:50 2005
New Revision: 21176
Modified:
pypy/dist/pypy/translator/backendopt/all.py
Log:
(ericvrp, cfbolz): adding a switch so that the if merging can be done for all graphs
Modified: pypy/dist/pypy/translator/backendopt/all.py
==============================================================================
--- pypy/dist/pypy/translator/backendopt/all.py (original)
+++ pypy/dist/pypy/translator/backendopt/all.py Thu Dec 15 15:26:50 2005
@@ -3,12 +3,14 @@
from pypy.translator.backendopt.malloc import remove_simple_mallocs
from pypy.translator.backendopt.ssa import SSI_to_SSA
from pypy.translator.backendopt.propagate import propagate_all
+from pypy.translator.backendopt.merge_if_blocks import merge_if_blocks
from pypy.translator import simplify
def backend_optimizations(translator, inline_threshold=1,
mallocs=True,
ssa_form=True,
+ merge_if_blocks_to_switch=False,
propagate=False):
# remove obvious no-ops
for graph in translator.graphs:
@@ -34,6 +36,10 @@
simplify.transform_dead_op_vars(graph, translator)
if propagate:
propagate_all(translator)
+
+ if merge_if_blocks_to_switch:
+ for graph in translator.graphs:
+ merge_if_blocks(graph)
if ssa_form:
for graph in translator.graphs:
More information about the Pypy-commit
mailing list