This is the mail archive of the 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 PR37053: Move tweaks of commutative precedence to target hook

Peter Bergner wrote:
On Fri, 2009-06-26 at 20:04 +0400, Maxim Kuvyrkov wrote:
Peter Bergner wrote:

In the mean time, I have asked Luis to test your patch on POWER6 to ensure
there are no performance degradations.  It doesn't look like there should
be, but...
The assembler should be exactly the same. If it isn't, then there's a bug in the patch.

That's exactly what we're testing for. With your patch, we'll always decrement the precedence value if we have a pointer. With the old code, that occurred only for RTX_OBJ. Maybe that's the only case were we'll see pointers, but I personally don't know that for sure.

I tried to avoid any differences from the current behavior ...

+static int
+rs6000_commutative_operand_precedence (const_rtx op, int value)
+  /* Prefer pointer objects over non pointer objects.
+     For rationale see PR28690.  */

... and the patch decrements the value only for RTX_OBJs.

+      && ((REG_P (op) && REG_POINTER (op))
+	  || (MEM_P (op) && MEM_POINTER (op))))
+    --value;
+  return value;

Peter and Luis,

In any case, thanks for testing the patch on PowerPC.


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