This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] RX TARGET_RTX_COSTS function
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: Nick Clifton <nickc at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Cc: Sebastian Perta <sebastian dot perta at renesas dot com>, 'DJ Delorie' <dj at redhat dot com>
- Date: Thu, 22 Feb 2018 21:10:51 +0900
- Subject: Re: [PATCH] RX TARGET_RTX_COSTS function
- Authentication-results: sourceware.org; auth=none
- References: <000301d3a4e2$e4653b00$ad2fb100$@renesas.com> <1518537991.10908.7.camel@t-online.de> <1518703627.10908.61.camel@t-online.de>
Ping.
On Thu, 2018-02-15 at 23:07 +0900, Oleg Endo wrote:
> On Wed, 2018-02-14 at 01:06 +0900, Oleg Endo wrote:
> >
> >
> > Do you happen to have any other numbers on the resulting code
> > size/speed? Looking at the new costs that the patch introduces,
> > I'd
> > expect there to be some more changes than just the 1/x...
> >
> I've checked your proposed patch with the CSiBE set for code size
> changes.
>
> With your patch, the code size of the whole set:
> sum: 2806044 -> 2801346 -4698 / -0.167424 %
>
>
> Taking out this piece
>
> case IF_THEN_ELSE:
> *total = COSTS_N_INSNS (3);
> return true;
>
> from the rx_rtx_costs results in:
> sum: 2806044 -> 2801099 -4945 / -0.176227 %
>
>
> Taking out another piece
>
> if (GET_CODE (XEXP (x, 0)) == MEM
> || GET_CODE (XEXP (x, 1)) == MEM)
> *total = COSTS_N_INSNS (3);
> else
>
> results in:
> sum: 2806044 -> 2800315 -5729 / -0.204166 %
>
> So I'd like to propose the attached patch instead, as it eliminates 1
> KByte of code more from the whole set.
>
> Just in case, I'm testing it now with
> "make -k check" on rx-sim for c and c++
>
> OK for trunk if it passes?
>
> Cheers,
> Oleg
>
> gcc/ChangeLog:
> * config/rx/rx.c (rx_rtx_costs): New function.
> (TARGET_RTX_COSTS): Override to use rx_rtx_costs.