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: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug


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




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