Xi Ruoyao d90eed13ae LoongArch: Enable shrink wrapping
This commit implements the target macros for shrink wrapping of function
prologues/epilogues shrink wrapping on LoongArch.

Bootstrapped and regtested on loongarch64-linux-gnu.  I don't have an
access to SPEC CPU so I hope the reviewer can perform a benchmark to see
if there is real benefit.

gcc/ChangeLog:

	* config/loongarch/loongarch.h (struct machine_function): Add
	reg_is_wrapped_separately array for register wrapping
	information.
	* config/loongarch/loongarch.cc
	(loongarch_get_separate_components): New function.
	(loongarch_components_for_bb): Likewise.
	(loongarch_disqualify_components): Likewise.
	(loongarch_process_components): Likewise.
	(loongarch_emit_prologue_components): Likewise.
	(loongarch_emit_epilogue_components): Likewise.
	(loongarch_set_handled_components): Likewise.
	(TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS): Define.
	(TARGET_SHRINK_WRAP_COMPONENTS_FOR_BB): Likewise.
	(TARGET_SHRINK_WRAP_DISQUALIFY_COMPONENTS): Likewise.
	(TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS): Likewise.
	(TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS): Likewise.
	(TARGET_SHRINK_WRAP_SET_HANDLED_COMPONENTS): Likewise.
	(loongarch_for_each_saved_reg): Skip registers that are wrapped
	separately.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/shrink-wrap.c: New test.
2023-05-07 00:58:15 +08:00
2023-04-01 00:17:38 +00:00
2023-04-29 00:16:48 +00:00
2023-03-29 00:17:01 +00:00
2023-05-07 00:58:15 +08:00
2023-04-26 00:17:46 +00:00
2023-04-29 00:16:48 +00:00
2023-03-25 00:16:51 +00:00
2023-03-29 00:17:01 +00:00
2023-05-01 00:16:44 +00:00
2023-05-03 00:17:11 +00:00
2023-03-23 00:17:30 +00:00
2023-05-05 00:16:36 +00:00
2023-04-03 00:16:43 +00:00
2023-03-18 00:16:40 +00:00
2023-03-03 00:16:38 +00:00
2023-05-01 00:16:44 +00:00
2023-05-06 00:16:37 +00:00
2023-04-21 00:17:31 +00:00
2023-04-29 00:16:48 +00:00
2023-04-28 13:15:33 -07:00
2023-04-28 13:15:33 -07: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 4.2 GiB
Languages
C++ 30.7%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.4%