Hans-Peter Nilsson 87222af419 CRIS: Handle POST_INC in cris_rtx_costs
POST_INC is a code that's only supposed to be valid in an address, so
it should only be calculated through the TARGET_ADDRESS_COST hook, not
by the TARGET_RTX_COSTS hook.  But, because rtx_cost does not
special-case MEM costs by calling TARGET_ADDRESS_COST, we get here as
part of e.g. the auto-inc-dec and combine passes, so deal with it for
the time being.  Without this, the cost is the value of size_factor *
COSTS_N_INSNS (1), i.e. 4 per word.  There's no obvious observable
effect for generated code (coremark, libgcc and newlib-libc checked
for -march=v10), but it may make a difference in the future, so be
safe and correct the cost.

Tested at r16-6493-ge77ba7ef8c75 for cris-elf.  That the cost actually
is changed is observable mostly simply by applying -dp when compiling
 int incref(int n, char *p)
 {
   int sum = 0;

   while (n--)
     sum += *p++;

   return sum;
 }
and seeing that the cost for the single autoincrement is changed from e.g.
	adds.b [$r11+],$r10	;# 15	[c=12 l=2]  *addsqisi_swap/1
to
	adds.b [$r11+],$r10	;# 15	[c=8 l=2]  *addsqisi_swap/1

gcc:
	* config/cris/cris.cc (cris_rtx_costs) <POST_INC>: Handle POST_INC
	as ZERO_EXTEND and SIGN_EXTEND, i.e. as an operator without cost.
2026-01-11 16:34:35 +01:00
2026-01-02 09:56:11 +01:00
2025-12-31 00:16:24 +00:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 10:47:06 +01:00
2026-01-02 09:56:11 +01:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2025-12-30 00:16:33 +00:00
2026-01-11 00:16:24 +00:00
2025-12-30 00:16:33 +00:00
2026-01-07 00:16:25 +00:00
2026-01-02 09:56:11 +01:00
2026-01-10 00:16:49 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 10:47:06 +01:00
2026-01-02 00:16:23 +00:00
2025-12-30 00:16:33 +00:00
2026-01-02 09:56:11 +01:00
2026-01-11 00:16:24 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2025-12-22 00:16:25 +00:00
2025-12-30 00:16:33 +00:00
2020-01-15 14:29:53 +01:00
2026-01-11 00:16:24 +00:00
2014-11-16 14:07:13 +00:00
2007-07-17 08:37:53 +00:00
2014-11-16 14:07:13 +00:00
2008-09-26 16:21:02 +00:00
2014-11-16 14:07:13 +00:00
2000-07-22 04:08:22 -04:00
2014-11-16 14:07:13 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 5.1 GiB
Languages
C++ 32%
C 30.9%
Ada 12.1%
D 6.5%
Go 6.5%
Other 11.5%