Generic value propagation engine

Diego Novillo dnovillo@redhat.com
Sun Aug 29 10:32:00 GMT 2004


The algorithm used by SSA-CCP to propagate constant values is useful for
propagating other types of values but both the lattice and meet
operation used for CCP are not generally useful.

This patch extracts the basic propagation engine into ssa_propagate(). 
This function receives two function arguments ssa_prop_visit_phi and
ssa_prop_visit_stmt.  These two functions implement the semantics of the
particular propagation.  Their return value determine whether a
statement is added to the work list.

The patch re-implements SSA-CCP in terms of the new propagator.  I've
got other implementations of the propagator in my local tree, which I
will flush out after this one.

There are no functional changes to CCP.  There is a slight improvement
in compile time.  The new implementation marks more statements to be
initially VARYING (labels, return statements, etc).

Bootstrapped and tested x86, alpha, x86_64, ppc and ia64.


Diego.


        * Makefile.in (OBJS-common): Add tree-ssa-propagate.o
        (tree-ssa-propagate.o): New rule.
        (GTFILES): Add tree-ssa-propagate.c.
        * tree-flow.h (struct stmt_ann_d): Remove field
        in_ccp_worklist.
        * tree-ssa-propagate.c: New file.
        * tree-ssa-propagate.h: New file.
        * tree-ssa-ccp.c: Re-write to use the routines from
        tree-ssa-propagate.c.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20040829-propeng.diff.gz
Type: application/x-gzip
Size: 24191 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040829/e686c1f9/attachment.bin>


More information about the Gcc-patches mailing list