This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <iant at google dot com>
- Date: Thu, 4 Jan 2007 15:09:06 -0600
- Subject: Re: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug
- References: <20061205050808.GA13002@vervain.rchland.ibm.com> <457572D1.8070801@lu.unisi.ch>
On Tue, Dec 05, 2006 at 02:23:29PM +0100, Paolo Bonzini wrote:
> This patch does not necessarily work. You should change other users of
> commutative_operand_precedence to agree with the new definition of
> swap_commutative_operands_p.
>
> The issue of the relative order of objects is quite thorny. The problem
> is that GCC prefers to have (set X (op X Y)) rather than (set X (op Y
> X)). This blocks the possibility to give a different precedence to MEMs
> and REGs (and in turn, this would allow to have a different precedence
> for REGs depending on REG_POINTER). I think that this patch is not
> going to be safe unless the underlying problems with (set X (op Y X))
> are fixed.
Can you explain what the underlying problems with (set X (op Y X)) are?
Is there one particular idiom (eg, X is a reg and Y is a mem) that is
important to get the ordering right or do all cases need to be ordered
right? Also, what does getting the right order do that helps so much?
Is it that it introduces more optimization opportunities or???
Peter