Patch: fix compress_float_constant heuristics
Dale Johannesen
dalej@apple.com
Mon Jul 11 04:14:00 GMT 2005
On Jul 10, 2005, at 8:57 PM, David Edelsohn wrote:
> * config/rs6000.c (rs6000_rtx_cost): Adjust FLOAT_EXTEND cost.
>
> + case FLOAT_EXTEND:
> + /* For memory references, float-to-double conversion is free. */
> + if (mode == DFmode
> + && GET_CODE (XEXP (x, 0)) == MEM
> + && GET_MODE (XEXP (x, 0)) == SFmode)
> + *total = 0;
> + else
> + *total = rs6000_cost->fp;
> + return false;
>
> FLOAT_EXTEND of a register also is free if the register allocator
> can be convinced to use the same register.
Yes, but you can't tell that here. If you want to make the more
aggressive assumption, fine with me.
> And what other mode would be
> the source for float_extend:DF other than SFmode?
I know, I thought it was clearer this way.
> if (mode == DFmode)
>
> should suffice.
OK.
> Also, it looks like there is an indentation problem on one of the
> two *total = lines. Tab versus spaces?
Yes, one is tab, one is 8 spaces. People keep saying there's some
standard
about this, but I've never found anything on the coding style pages....
More information about the Gcc-patches
mailing list