Go to file
Richard Sandiford df1f0eef67 Remove call_fixed_reg_set
On targets that use reload, call_fixed_reg_set is structurally:

  fixed_reg_set                           -- reginfo.c
  | (call_used_reg_set & ~have_save_mode) -- first loop in init_caller_save
  | ~have_save_insn                       -- final loop in init_caller_save

(where "have_save_mode" and "have_save_insn" are just my names).
But the final loop in init_caller_save does:

  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
    for (j = 1; j <= MOVE_MAX_WORDS; j++)
      if (reg_save_code (i,regno_save_mode[i][j]) == -1)

This last condition ought to be true whenever:

  regno_save_mode[i][j] == VOIDmode

since either targetm.hard_regno_mode_ok (i, VOIDmode) should be
false or the VOIDmode save & restore shouldn't match any move insn.
And after the first loop, regno_save_mode[i][j] == VOIDmode whenever
!call_used_regs[i].  So the above is actually:

  fixed_reg_set
  | (call_used_reg_set & ~have_save_mode)
  | (~call_used_reg_set | ~have_save_insn)

which simplifies to:

  fixed_reg_set                        -- reginfo.c
  | ~have_save_mode                    -- first loop in init_caller_save
  | ~have_save_insn                    -- final loop in init_caller_save
  | ~call_used_reg_set                 -- final loop in init_caller_save

So:

  ~call_fixed_reg_set == (~fixed_reg_set
		          & have_save_mode
			  & have_save_insn
			  & call_used_reg_set)  [A]

All users have the form:

  (call_used_reg_set or some subset) & ~(call_fixed_reg_set | ...)

i.e.:

  (call_used_reg_set or some subset) & ~call_fixed_reg_set & ~(...)

We can therefore drop the "& call_used_reg_set" from [A], leaving:

  ~fixed_reg_set & have_save_mode & have_save_insn

This patch combines have_save_mode & have_save_insn into a single
condition "a save is possible", represented as savable_regs.
We can then substitute:

  ~call_fixed_reg_set --> ~fixed_reg_set & savable_regs
                          (registers we can actually save around calls)

The patch also sets regno_save_mode[i][j] for all registers,
in case non-default ABIs require a save when the default ABI
doesn't.  This ensures that savable_regs (like fixed_reg_set but
unlike call_fixed_reg_set) isn't affected by the ABI.  This only
becomes significant with later patches and at this point is just
a simplification.

Since init_caller_save is only called for reload targets,
the default assumption for LRA is that all registers are savable,
just like the default assumption before the patch was that
(~)call_fixed_reg_set == (~)fixed_reg_set.

2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* hard-reg-set.h (target_hard_regs::x_call_fixed_reg_set): Delete.
	(target_hard_regs::x_savable_regs): New field.
	(call_fixed_reg_set): Delete.
	(savable_regs): New macro,
	* reginfo.c (globalize_reg): Don't set call_fixed_reg_set.
	(init_reg_sets_1): Likewise.  Initialize savable_regs.
	* caller-save.c (init_caller_save): Invoke HARD_REGNO_CALLER_SAVE_MODE
	for all registers.  Set savable_regs instead of call_fixed_reg_set.
	(setup_save_areas, save_call_clobbered_regs): Replace uses of
	~call_fixed_reg_set with ~fixed_reg_set & savable_regs.
	* config/sh/sh.c (output_stack_adjust): Likewise.

From-SVN: r275598
2019-09-10 18:56:26 +00:00
INSTALL
config [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
contrib GCC port for eBPF 2019-09-09 12:13:23 +02:00
fixincludes [Darwin, fixincludes] Fix PR83531 2019-08-18 18:54:13 +00:00
gcc Remove call_fixed_reg_set 2019-09-10 18:56:26 +00:00
gnattools PR81878: fix --disable-bootstrap --enable-languages=ada 2018-11-20 00:07:47 +00:00
gotools libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
include Fix file descriptor existence of MinGW. 2019-08-08 07:50:28 +00:00
intl iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. 2018-11-07 15:41:21 -07:00
libada Update copyright years. 2019-01-01 13:31:55 +01:00
libatomic [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
libbacktrace Remove Cell Broadband Engine SPU targets 2019-09-03 15:08:28 +00:00
libcc1 [C++ PATCH] Using decls 2019-05-21 14:33:24 +00:00
libcpp [preprocessor] Popping "" file names 2019-09-06 12:54:19 +00:00
libdecnumber Update copyright years. 2019-01-01 13:31:55 +01:00
libffi re PR other/79543 (Inappropriate "ld --version" checking) 2019-09-03 14:10:26 +00:00
libgcc [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture 2019-09-10 09:58:44 +02:00
libgfortran Improve PRNG jumping when using threads 2019-09-05 09:59:55 +03:00
libgo cmd/go: look for tool build ID before hashing entire file 2019-09-10 02:48:24 +00:00
libgomp Fix GCC_LINUX_FUTEX to work with C99 compilers 2019-09-06 12:27:36 +02:00
libhsail-rt Update copyright years. 2019-01-01 13:31:55 +01:00
libiberty rust-demangle.c (unescape): Remove. 2019-09-03 14:04:32 -06:00
libitm [ARM/FDPIC v6 23/24] [ARM] FDPIC: Implement libitm support. 2019-09-10 10:11:46 +02:00
libobjc re PR target/89093 (C++ exception handling clobbers d8 VFP register) 2019-04-23 12:03:41 +02:00
liboffloadmic PR other/16615 [1/5] 2019-01-09 16:37:45 -05:00
libphobos libphobos.exp (libphobos_init): Add multi-lib libgcc dirs to the ld_library_path var. 2019-09-03 08:24:03 +00:00
libquadmath quadmath.h (M_Eq, [...]): Use two more decimal places. 2019-08-02 09:59:19 +02:00
libsanitizer [ARM/FDPIC v6 03/24] [ARM] FDPIC: Force FDPIC related options unless -mno-fdpic is provided 2019-09-10 09:39:47 +02:00
libssp Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-v3 Implement std::common_reference for C++20 2019-09-10 17:28:27 +01:00
libvtv Fix testsuite 2019-02-20 08:07:19 -08:00
lto-plugin lto-plugin, removed unused variable 2019-05-15 14:10:27 +00:00
maintainer-scripts update_web_docs_svn: Proceed even if the invocation of sphinx fails. 2019-08-04 22:31:54 +00:00
zlib Makefile.am (noinst_LTLIBRARIES): Rename libzgcj_convience.la to libz_convenience.la. 2019-01-21 17:23:58 +00:00
.dir-locals.el
.gitattributes
.gitignore Add .clangd and compile_commands.json to .gitignore. 2019-08-28 19:33:28 +00:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS GCC port for eBPF 2019-09-09 12:13:23 +02:00
Makefile.def Sync top-level change from gdb 2019-06-15 21:32:03 +00:00
Makefile.in Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD. 2019-08-23 15:37:22 -06:00
Makefile.tpl Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD. 2019-08-23 15:37:22 -06:00
README
ar-lib Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
compile
config-ml.in Add D front-end, libphobos library, and D2 testsuite. 2018-10-28 19:51:47 +00:00
config.guess Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
config.rpath
config.sub Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
configure GCC port for eBPF 2019-09-09 12:13:23 +02:00
configure.ac GCC port for eBPF 2019-09-09 12:13:23 +02:00
depcomp
install-sh
libtool-ldflags
libtool.m4 [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
multilib.am Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
symlink-tree
test-driver Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ylwrap

README

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.