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: PowerPC : GCC2 optimises better than GCC4???


On Mon, Jan 04, 2010 at 12:18:50PM +0100, Steven Bosscher wrote:
> > This optimization is done by the first RTL cse pass. ?I can't understand
> > why it's not being done for your target. ?I guess this will need a
> > powerpc expert.
> 
> Known bug, see http://gcc.gnu.org/PR22141

That's unrelated.  PR22141 is about (lack of) merging of adjacent stores of
constant values into memory, but there are no memory stores involved here,
everything is in registers, so PR22141 patch will make zero difference here.

IMHO we really should have some late tree pass that converts adjacent
bitfield operations into integral operations on non-bitfields (likely with
alias set of the whole containing aggregate), as at the RTL level many cases
are simply too many instructions for combine etc. to optimize them properly,
while at the tree level it could be simpler.

Regarding PR22141, the patch works for the memory store merging, but has
performance regressions (mainly on PowerPC).  I guess I could enable it at
least for -Os and in that case check the sizes of all insns that are going
to be DCEd because of it against the size of the new sequence.
For -O2 perhaps I could limit it to only aligned stores with rtx_cost of the
constant being 0 or something similar.

	Jakub


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