This is the mail archive of the 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] fix address_cost for x86


> >ix86_address_cost considers offsetted addressing modes cheaper than
> >the modes without offset.  Ivopts thus try to introduce offsets to 
> >addresses
> >whenever it is possible, even in cases it does not give any gain.
> >This may result in larger code, or losing debug information (PR 32445).
> >	* config/i386/i386.c (ix86_address_cost): Do not consider more 
> >	complex
> >	addressing modes cheaper.
> Does this patch also fix PR 24669 and two PRs that it blocks?

it fixes PR 24669, but not PRs 18219 and 26726.  The problem is
that both using and not using the offset has the same cost with the
change, and ivopts just select between them arbitrarily; which
happens to be the offsetted mode for these two PRs.  Anyway, this should
be easy to fix in ivopts.

> BTW: Some time ago, I have played with address_cost on x86 (trying to
> fix PR 24669), but by changing the costs there, access to symbols
> regressed badly - gcc didn't produce [ref + offset] addressing, but
> ony reg = ref + offset; [reg] indirect sequences. Have you checked
> this issue with your patch?

I do not see this happen (i.e., [ref + offset] addresses seem to be
produced as expected).  Do you have some concrete example that used
to cause problems?


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