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: [4.5] Find more autoinc addressing for induction variables


> > There'll be another patch to go with this one that makes
> > tree-ssa-loop-ivopts.c generate more opportunities for this one to trigger.
> 
> That's nice, I recall seeing quite a few reports on this.  Maybe we want
> this only at -O2 though, DU/UD chains are relatively expensive to build
> (see PR39157).
> 
> Paolo
> 

There is a way to have your cake and eat it too!!!!

There is an interface to df that allows you to cut out a region of
code (say the inner loop) and build the chains you want only over the
variables defined or used in that region.  There is a call in df
(df_set_blocks) which allows you to pass a bitmap of the basic blocks
you are interested in.  You put that call after you ask for the
df problems but before you call df_analyze.  You can then reset the
bitmap and call df_analyze again for the next loop.

this interface was used by zdenek in the rtl loop code and so you can
easily steal the code from there.   While you are in the loop code you should
check out the code that zdenek uses to build the tree of loops in the
program and traverse only the inner ones.  

Kenny


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