This is the mail archive of the
mailing list for the GCC project.
Re: [ast-optimizer-branch] [patch]: SSA for trees
- To: Diego Novillo <dnovillo at redhat dot com>
- Subject: Re: [ast-optimizer-branch] [patch]: SSA for trees
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Mon, 23 Jul 2001 14:36:18 -0400
- Cc: Nathan Sidwell <nathan at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- References: <20010723132426.A305@tornado.cygnus.com>
Diego Novillo <firstname.lastname@example.org> writes:
> This patch is the current version of the SSA for trees
> implementation. I am working on documentation patches to
> describe the internal design.
> In the meantime I would like to incorporate it to the
> ast-optimizer branch so that development can continue. There are
> some outstanding patches from other people that would be easier
> to manage if I had the main code in CVS.
> There are six new files in this patch:
> - tree-cfg.c: Builds a flowgraph.
> - tree-dfa.c: Finds variable references.
> - tree-flow.h: Declares data structures and global functions.
> - tree-opt.[ch]: Entry point to the SSA optimizer.
> - tree-ssa.c: Builds the SSA representation.
> The patch has been bootstrapped with -ftree-ssa and regression
> tested on i686-pc-linux-gnu.
> Would it be OK to include it in the branch? Although large, the
> patch should not destabilize anything as it is only activated
> when compiling with -ftree-ssa.
I already asked nathan about the loop and callgraph portions i
worked on, of which your code is a pre-req for. He said it was fine,
as long as there were flags to turn it on/off.
I'm actually about to commit this stuff, which includes your stuff as
a subset requirement.
I changed the main flag from -ftree-ssa to -ftree-opt, and
-ftree-opt-ssa turns on SSA based tree optimizations (and
-ftree-opt-loop turns on the loop optimizations, and
-ftree-opt-callgraph does the call graph tracking)
This is all, if you don't mind, of course. The ChangeLog entry has
your name first, mine second, and says that everything not in
tree-loop.[ch] and tree-cg.[ch] was done by you.
> Thanks. Diego.
> * Makefile.in (C_AND_OBJC_OBJS): Add tree-cfg.o, tree-dfa.o,
> tree-ssa.o and tree-opt.o.
> (c-decl.o): Add dependency on tree-opt.h
> (tree-ssa.o): New rule.
> (tree-cfg.o): New rule.
> (tree-dfa.o): New rule.
> (tree-opt.o): New rule.
> * c-decl.c: Include tree-opt.h.
> (c_expand_body): Call optimize_tree() when the -ftree-ssa flag is
> * flags.h (flag_tree_ssa): Declare.
> * toplev.c (flag_tree_ssa): Define.
> (lang_independent_options): Add -ftree-ssa.
> * tree-cfg.c: New file.
> * tree-dfa.c: New file.
> * tree-flow.h: New file.
> * tree-opt.c: New file.
> * tree-opt.h: New file.
> * tree-ssa.c: New file.
> * cp/Make-lang.in (CXX_C_OBJS): Add tree-cfg.o, tree-dfa.o,
> tree-opt.o and tree-ssa.o.
> * doc/invoke.texi: Add documentation for -ftree-ssa.
"I used to be a waiter, but I was fired for clearing tables. I
was clearing them for take off. I had them all lined up
outside. People thought it was an outdoor cafe. I said, "No,
these are leaving at 3." They were going to fire me anyway,
because I told them I thought they should put the wrapper on the
inside of the straw since that's the part you don't want to get