Go to file
Vineet Gupta e919fae01b RISC-V: Inhibit FP <--> int register moves via tune param
Under extreme register pressure, compiler can use FP <--> int
moves as a cheap alternate to spilling to memory.
This was seen with SPEC2017 FP benchmark 507.cactu:
ML_BSSN_Advect.cc:ML_BSSN_Advect_Body()

|	fmv.d.x	fa5,s9	# PDupwindNthSymm2Xt1, PDupwindNthSymm2Xt1
| .LVL325:
|	ld	s9,184(sp)		# _12469, %sfp
| ...
| .LVL339:
|	fmv.x.d	s4,fa5	# PDupwindNthSymm2Xt1, PDupwindNthSymm2Xt1
|

The FMV instructions could be costlier (than stack spill) on certain
micro-architectures, thus this needs to be a per-cpu tunable
(default being to inhibit on all existing RV cpus).

Testsuite run with new test reports 10 failures without the fix
corresponding to the build variations of pr105666.c

| 		=== gcc Summary ===
|
| # of expected passes		123318   (+10)
| # of unexpected failures	34       (-10)
| # of unexpected successes	4
| # of expected failures	780
| # of unresolved testcases	4
| # of unsupported tests	2796

gcc/ChangeLog:

	* config/riscv/riscv.cc: (struct riscv_tune_param): Add
	  fmv_cost.
	(rocket_tune_info): Add default fmv_cost 8.
	(sifive_7_tune_info): Ditto.
	(thead_c906_tune_info): Ditto.
	(optimize_size_tune_info): Ditto.
	(riscv_register_move_cost): Use fmv_cost for int<->fp moves.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/pr105666.c: New test.

Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
(cherry picked from commit b646d7d279)
2022-06-02 10:10:51 +08:00
c++tools Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
config Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
contrib Daily bump. 2022-05-07 00:18:53 +00:00
fixincludes Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
gcc RISC-V: Inhibit FP <--> int register moves via tune param 2022-06-02 10:10:51 +08:00
gnattools Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
gotools Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
include Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
INSTALL
intl Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libada Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libatomic Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libbacktrace Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libcc1 Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libcody Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libcpp Daily bump. 2022-05-31 00:19:02 +00:00
libdecnumber Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libffi Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libgcc Daily bump. 2022-05-17 00:18:54 +00:00
libgfortran Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libgo runtime: use correct field name for PPC32 GLIBC registers 2022-04-20 17:49:44 -07:00
libgomp Daily bump. 2022-05-31 00:19:02 +00:00
libiberty Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libitm Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libobjc Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
liboffloadmic Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libphobos Daily bump. 2022-05-16 00:19:11 +00:00
libquadmath Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libsanitizer libsanitizer: cherry-pick commit b226894d475b from upstream 2022-05-06 07:38:35 -07:00
libssp Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
libstdc++-v3 Daily bump. 2022-05-28 00:19:07 +00:00
libvtv Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
lto-plugin Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
maintainer-scripts Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
zlib Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Update ChangeLog and version files for release 2022-05-06 07:07:53 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure LoongArch Port: Regenerate configure 2022-03-29 17:43:32 +08:00
configure.ac LoongArch Port: Regenerate configure 2022-03-29 17:43:32 +08:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Update my email address. 2022-04-19 10:29:15 -07:00
Makefile.def toplevel: Makefile.def: Make configure-sim depend on all-readline 2022-03-09 20:54:37 +01:00
Makefile.in toplevel: Makefile.def: Make configure-sim depend on all-readline 2022-03-09 20:54:37 +01:00
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

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.