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: Improve funcorder.c optimisation on ppc-darwin


> > This patch:
> > 
> > +2003-10-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
> > +
> > +       PR optimization/12142
> > +       * cse.c (count_reg_usage): In a SET with a REG SET_DEST, count the
> > +       uses of the register in the SET_SRC.  Remove unnecessary argument.
> > +       * pa.c (legitimize_pic_address): Before reload, use a scratch
> > register
> > +       for the intermediate result in loading the address of a SYMBOL_REF.
> > +       Set the MEM_NOTRAP_P flag for the MEM.  Add a REG_EQUAL to the insn
> > +       which loads the SYMBOL_REF address.
> > 
> > caused 
> > FAIL: gcc.dg/funcorder.c scan-assembler-not link_error
> > 
> > on powerpc-darwin.  I can't convince myself that the Dave's patch is either
> > correct or incorrect; certainly, it seems like the patch suppresses at
> > least some legitimate optimisations.
> 
> Yes, I'm wondering if it would be better to revert the cse.c portion of my
> patch and Jan's rework of count_reg_usage last March.  I noticed a simple

If I recall correctly, the count_reg_usage change was buggy and I sent a
patch to fix it, but it definitly wasn't very clear and I don't think it
was ever reviewed.
Probably it is really better to revert that patch as it does not cause
that big performance difference compared to problems it brings.

Honza
> nop move survived to the combine pass in some code I was looking at on the
> weekend.  I had thought that other optimizations would clean up the
> situations where it wasn't possible to use a scratch register.  However,
> it seems that this isn't always the case.
> 
> If this rework is done, count_reg_usage would have to be fixed to handle
> -fnon-call-exceptions correctly.
> 
> Dave
> -- 
> J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
> National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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