This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: RL78: Fix multiply costs when optimizing for size
- From: DJ Delorie <dj at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Aug 2015 13:10:50 -0400
- Subject: Re: RFA: RL78: Fix multiply costs when optimizing for size
- Authentication-results: sourceware.org; auth=none
- References: <87io8tj10f dot fsf at redhat dot com>
> OK to apply ?
Ok. Thanks!
> gcc/ChangeLog
> 2015-08-05 Nick Clifton <nickc@redhat.com>
>
> * config/rl78/rl78.c (rl78_rtx_costs): Treat MULT insns as cheap
> if optimizing for size.
>
> Index: gcc/config/rl78/rl78.c
> ===================================================================
> RCS file: /cvs/cvsfiles/gnupro/gcc/config/rl78/rl78.c,v
> retrieving revision 1.12.6.15
> diff -u -3 -p -r1.12.6.15 rl78.c
> --- gcc/config/rl78/rl78.c 29 Jul 2015 12:24:04 -0000 1.12.6.15
> +++ gcc/config/rl78/rl78.c 30 Jul 2015 15:20:10 -0000
> @@ -4161,7 +4161,9 @@ static bool rl78_rtx_costs (rtx x,
> switch (code)
> {
> case MULT:
> - if (RL78_MUL_G14)
> + if (! speed)
> + * total = COSTS_N_INSNS (5);
> + else if (RL78_MUL_G14)
> *total = COSTS_N_INSNS (14);
> else if (RL78_MUL_G13)
> *total = COSTS_N_INSNS (29);
>