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


Hi,

> >I'll see whether I can achieve a similar effect by modifying 
> >tree-ssa-loop-ivopts instead.  Maybe I can add new candidates that get 
> >incremented in suitable basic blocks other than just the last one. 
> 
> So here's a draft of what that would look like.  For every use/cand pair 
> for which autoinc is possible (which now requires that the use's block 
> is not in a nested loop, and dominates the latch), we create a new 
> candidate which is incremented at the point of the use, and compute its 
> cost without including the cost of the step.  This also gets rid of the 
> special handling in iv_ca_recount_cost.
> 
> Does this look like an approach that everyone can live with?

yes, this certainly looks like an approach that plays well with
the rest of ivopts.  Of course, assuming that it actually will
work (and will not be prohibitively expensive on compile time) ;-)

Zdenek


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