This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Generic value propagation engine


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.

Attachment: 20040829-propeng.diff.gz
Description: GNU Zip compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]