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]

Re: ADDRESS_COST cleanups


On Sun, Apr 23, 2000 at 10:22:31PM +0200, Jan Hubicka wrote:
> 	* cse.c (CSE_ADDRESS_COST): Remove.
> 	(find_best_addr): Add new parameter "MODE", use address_cost instead
> 	of CSE_ADDRESS_COST
> 	(address_cost): New.
> 	(fold_rtx): Update call of find_best_addr.
> 	* rtl.h (address_cost): Declare.
> 	* loop.c (general_induction_var): Add new parameter "MODE", use
> 	address_cost instead of ADDRESS_COST
> 	(init_loop): Use address_cost instead of ADDRESS_COST.
> 	(check_insn_for_givs): Update call of general_induction_var.
> 	(find_mem_givs): Likewise.
> 	(consec_sets_giv): Likewise.
> 	* config/i386/i386.h (ADDRESS_COST): Call ix86_address_cost.
> 	* i386.c (ix86_address_cost): New.
> 	* i386-protos.h (ix86_address_cost): Declare.

Ok.

> +      Following addressing mode are affected:
> +       [base+scale×index]
> +       [scale×index+disp]
> +       [base+index]
> +    
> +      The first and last case  may be avoidable by explicitly coding the zero in
> +      memory address, but I don't have AMD-K6 machine handy to check this
> +      theory.  */
> + 
> +   if (TARGET_K6
> +       && ((!parts.disp && parts.base && parts.index && parts.scale != 1)
> + 	  || (parts.disp && !parts.base && parts.index && parts.scale != 1)
> + 	  || (!parts.disp && parts.base && parts.index && parts.scale == 1)))

I thought decompose_address already looked for this and inserted
a zero displacement as appropriate?


r~

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