This is the mail archive of the
mailing list for the GCC project.
Re: [4.5] Find more autoinc addressing for induction variables
> >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) ;-)