This is the mail archive of the gcc@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: Optimization advice for maintainers: go for low-hanging fruit


Jan Hubicka <jh@suse.cz> writes:

  > > I've been staring at a lot of g++-generated x86 assembler, trying to
  > > coax g++ into creating better code, and creating a bunch of
  > > optimization-related PRs.  Overall, I'm disappointed by gcc's ability
  > > to optimize some very simple things like constant-folding.
  > > 
  > > The most distressing thing about the failures is that gcc is
  > > invariably capable of performing all the optimizations I care about,
  > > just not consistently.  Seemingly irrelevant random features of the
  > > source code seem to inhibit optimizations from being performed.
  > 
  > Can you send some testcases where GCC fails to do the transformation?

Look at the audit trail for PR8967, the example there shows that life
analysis fails to eliminate some insns in one case. 

Also please take a look at PR9016, the 4 functions in that generate
the same (optimal) assembly on SPARC, but some of them don't get
optimized well on x86. 


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