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: inc-dec (was: Re: [RFC, ivopts] fix bugs in ivopts address cost computation)


On Sun, 2012-06-10 at 13:50 -0400, Hans-Peter Nilsson wrote:
> On Sun, 10 Jun 2012, Oleg Endo wrote:
> > I've tried some of the cases mentioned in
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50749
> > with Sandra's patch applied.  Unfortunately it didn't help much.
> 
> But thanks for checking!
> 

Sure thing.
I forgot to mention that when trying it, I also played a bit with the
address cost function, but it didn't have any effect either.

> > BTW, auto-inc-dec uses 'set_src_cost' in 'attempt_change' to determine
> > the address costs.  At least the SH target will not respond to that
> > properly.  I was thinking of adding something to sh_rtx_costs to invoke
> > sh_address_cost as a fix for that, but on the other hand I was wondering
> > why the target's address cost function isn't used in auto-inc-dec
> > directly ...
> 
> Sounds like a bug.

Depends on the perspective ;)
I don't know on/for which target it was developed originally.  If this
target's rtx cost function meets the expectations, then there's a bug in
any other target ;)

> TBH, I haven't dug into the real reason why
> auto-inc-dec-generation is still poor (or whether it by magic
> has improved dramatically recently), because every so often
> there's some effort to improve that, alas I don't remember
> seeing any improvement mentioned for any target I have interest
> in.

At the time when I filed the aforementioned PR it was at least able to
find and generate the first post-inc addr (see the original description
of the PR).  Now it seems that it fails to do so.  So I guess some of
the pre-conditions for the auto-inc-dec pass have slightly changed since
then...

Cheers,
Oleg




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