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] Unrolling addressing optimization


On Sun, 11 Apr 2004, Zdenek Dvorak wrote:
> *** cse.c	4 Apr 2004 21:44:41 -0000	1.298
> --- cse.c	11 Apr 2004 11:00:17 -0000
> *************** fold_rtx (rtx x, rtx insn)
> *** 4073,4078 ****
> --- 4073,4079 ----
>   		  || XEXP (y, 0) == folded_arg0)
>   		break;
>
> + #if 0
>   	      /* Don't associate these operations if they are a PLUS with the
>   		 same constant and it is a power of two.  These might be doable
>   		 with a pre- or post-increment.  Similarly for two subtracts of
> *************** fold_rtx (rtx x, rtx insn)
> *** 4088,4093 ****
> --- 4089,4095 ----
>   		      || (HAVE_POST_DECREMENT
>   			  && exact_log2 (- INTVAL (const_arg1)) >= 0)))
>   		break;
> + #endif
>
>   	      /* Compute the code used to compose the constants.  For example,
>   		 A-C1-C2 is A-(C1 + C2), so if CODE == MINUS, we want PLUS.  */
>

Hi Zdenek,

If possible, could you post some SPEC results (including the geometric
means/overall scores) for this change to CSE for two or three platforms?
I agree that this current code that disables reassociation and
simplification of arithmetic expressions may often do more harm than
good.  If we have empirical evidence that your change doesn't hurt
performance, then I'd support removing the above lines.

Roger
--


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