This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ADDRESS_COST cleanups
- To: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Subject: Re: ADDRESS_COST cleanups
- From: Richard Henderson <rth at cygnus dot com>
- Date: Thu, 27 Apr 2000 03:27:35 -0700
- Cc: egcs-patches at egcs dot cygnus dot com
- References: <20000423222231.A23152@atrey.karlin.mff.cuni.cz>
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~