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]

Re: x86 address_cost tweak


> On Fri, Sep 07, 2001 at 11:15:15AM -0700, Richard Henderson wrote:
> > On x86, results for the aforementioned Fortran test cases is
> > approximately ideal.  Moreover, the difference without (-) and
> > with (+) -fno-reduce-all-givs is noise:
> 
> Oh, I forgot.  I had the following patch installed for x86.
> 
> The reason I disabled this fragment is that it makes complex
> addresses *cheaper* than bare registers, which makes the giv
> benefit negative, which means we will *never* reduce any complex
> giv unless forced, even if the giv is much more complex than
> the available addressing modes.
I've sent some time ago patch handling this. The part of problem
is in the benefit computation code that don't update costs when
it decides to combine givs (so givs becomes addressing expression instead
of single register)

The patch has not been reviewed.

http://gcc.gnu.org/ml/gcc-patches/2001-08/msg00359.html
> 
> Better is to say that complex addresses are equal cost with
> bare registers, which gives them a benefit of 0, which should
> mean that we have to have other complexities to make reduction
> worthwhile.
This may make sense too and is kind of complementary to my patch.

We really should make strength reduction analysis more global.
I am thking about way out of loop optimizer disaster (we probably
can't hope to CFGize and modernize it at once).

What do you think about moving the induction variables and GIVs discovery
code to separate library and create multiple passes on top of that - the
strength reduction should be one of them.

Reusing current code, cleaning up the structures and using Michael's loop
and DU/DF framework, this can be appealing project for me :)

Thanks for tracking this issue.
Honza


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