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]

Re: [patch] Add tree-ssa-loop.h and friends.


On Thu, Oct 3, 2013 at 4:11 AM, Andrew MacLeod <amacleod@redhat.com> wrote:
> this patch consolidates tree-ssa-loop*.c files with new .h files as required
> (8 in total)
>
> A number of the prototypes were in tree-flow.h, but there were also a few in
> cfgloop.h.  tree-ssa-loop.h was created to contain a couple of common
> structs and act as the gathering file for any generally applicable
> tree-ssa-loop includes. tree-flow.h includes this file for now.
>
> There is a bit of a criss-cross mess between the cfg-* and tree-ssa-loop*
> routines, but I'm not touching that for now.  Some of that might have to get
> resolved when I try to remove tree-flow.h as a standard include file from
> the .c files.. we'll see.
>
> In particular, tree-ssa-loop-niter.h exports a lot of more generally used
> routines. loop-iv.c, loop-unroll.c and loop-unswitch.c needed to include it.
>
> A few routines werent referenced outside their file so I made those static,
> and there was one routine stmt_invariant_in_loop_p wich was actually unused.
>
> bootstraps on x86_64-unknown-linux-gnu and passes with no new regressions.
> OK?

+   enum tree_code cmp;
+ };
+
+ #include "tree-ssa-loop-im.h"
+ #include "tree-ssa-loop-ivcanon.h"

what's the particular reason to not do includes first?  That looks really
odd (and maybe rather than doing that these includes should be done
elsewhere, like in .c files or in a header that includes tree-ssa-loop.h).

You seem to export things like movement_possibility that are not
used outside of tree-ssa-loop-im.c (in my tree at least).

Other than that the single reason we have to have all these exports
is that loop passes have their pass structures and gate / entries
defined in tree-ssa-loop.c instead of in the files the passes reside.
Consider changing that as a preparatory patch - it should cut down
the number of needed new .h files.

Richard.


> Andrew
>


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