Go to file
Richard Sandiford f15643d4ea Turn SECONDARY_MEMORY_NEEDED into a hook
Since the patch is going through all the definitions anyway, it seemed
like a good opportunity to put the mode argument first, to match the
order for register_move_cost.

2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* target.def (secondary_memory_needed): New hook.
	(secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
	instead of SECONDARY_MEMORY_NEEDED.
	(secondary_memory_needed_mode): Likewise.
	* hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
	* hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
	* doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
	(TARGET_SECONDARY_MEMORY_NEEDED): ...this.
	(SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
	* doc/tm.texi: Regenerate.
	* config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
	* config/i386/i386.c (inline_secondary_memory_needed): Put the
	mode argument first and change the reg_class arguments to reg_class_t.
	(ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
	Make static.  Update the call to inline_secondary_memory_needed.
	(ix86_register_move_cost): Update the call to
	inline_secondary_memory_needed.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
	definition.
	* config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
	TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
	in comment.
	* config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
	* config/mips/mips.c (mips_secondary_memory_needed): Make static
	and match hook interface.  Add comment from mips.h.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/mmix/mmix.md (truncdfsf2): Refer to
	TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
	in comment.
	* config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
	(PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
	* config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(pa_secondary_memory_needed): New function.
	* config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
	* config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(pdp11_secondary_memory_needed): Make static and match hook interface.
	* config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/powerpcspe/powerpcspe-protos.h
	(rs6000_secondary_memory_needed_ptr): Delete.
	* config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
	Delete.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(rs6000_option_override_internal): Assign to
	targetm.secondary_memory_needed rather than
	rs6000_secondary_memory_needed_ptr.
	(rs6000_secondary_memory_needed): Match hook interface.
	(rs6000_debug_secondary_memory_needed): Likewise.
	* config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
	(riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
	Delete.
	* config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(rs6000_option_override_internal): Assign to
	targetm.secondary_memory_needed rather than
	rs6000_secondary_memory_needed_ptr.
	(rs6000_secondary_memory_needed): Match hook interface.
	(rs6000_debug_secondary_memory_needed): Likewise.
	* config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/s390/s390.c (s390_secondary_memory_needed): New function.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(sparc_secondary_memory_needed): New function.
	* lra-constraints.c (check_and_process_move): Refer to
	TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
	in comment.
	(curr_insn_transform): Likewise.
	(process_alt_operands): Use targetm.secondary_memory_needed
	instead of TARGET_SECONDARY_MEMORY_NEEDED.
	(check_secondary_memory_needed_p): Likewise.
	(choose_split_class): Likewise.
	* reload.c: Unconditionally include code that was previously
	conditional on SECONDARY_MEMORY_NEEDED.
	(push_secondary_reload): Use targetm.secondary_memory_needed
	instead of TARGET_SECONDARY_MEMORY_NEEDED.
	(push_reload): Likewise.
	* reload1.c: Unconditionally include code that was previously
	conditional on SECONDARY_MEMORY_NEEDED.
	(choose_reload_regs): Use targetm.secondary_memory_needed
	instead of TARGET_SECONDARY_MEMORY_NEEDED.
	(gen_reload): Likewise.
	* system.h (SECONDARY_MEMORY_NEEDED): Poison.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r252461
2017-09-13 17:05:16 +00:00
config
contrib
fixincludes
gcc Turn SECONDARY_MEMORY_NEEDED into a hook 2017-09-13 17:05:16 +00:00
gnattools re PR ada/81878 (--disable-bootstrap --enable-languages=ada fails) 2017-08-17 13:39:58 +00:00
gotools Fix e-mail address. 2017-08-30 18:27:39 +00:00
include Add DW_CFA_AARCH64_negate_ra_state to dwarf2.def/h and dwarfnames.c 2017-09-12 16:39:59 +00:00
INSTALL
intl
libada
libatomic
libbacktrace re PR other/81096 (test case ttest in libbacktrace fails starting with its introduction in r249111) 2017-09-12 17:00:00 +00:00
libcc1
libcilkrts
libcpp
libdecnumber
libffi
libgcc config.host (*-*-vxworks7): Widen scope to vxworks7*. 2017-09-01 13:43:01 +00:00
libgfortran re PR fortran/34640 (ICE when assigning item of a derived-component to a pointer) 2017-09-10 17:02:53 +00:00
libgo mksysinfo: fix in6_addr in mld_hdr_t for Solaris 2017-08-31 20:07:55 +00:00
libgomp libgomp.texi (Top): www.openacc.org now uses https. 2017-09-08 12:27:14 +00:00
libhsail-rt
libiberty Add DW_CFA_AARCH64_negate_ra_state to dwarf2.def/h and dwarfnames.c 2017-09-12 16:39:59 +00:00
libitm
libmpx
libobjc [2/77] Add an E_ prefix to case statements 2017-08-30 11:08:28 +00:00
liboffloadmic
libquadmath re PR libquadmath/81848 (Add PowerPC support to libquadmath) 2017-09-01 22:10:57 +00:00
libsanitizer * include/system/sys/ptrace.h: New file. 2017-08-07 10:32:47 +02:00
libssp
libstdc++-v3 PR libstdc++/81468 constrain std::chrono::time_point constructor 2017-09-13 15:07:44 +01:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog * MAINTAINERS: Remove email address of Jim Norris. 2017-09-13 18:12:53 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
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: Remove email address of Jim Norris. 2017-09-13 18:12:53 +02:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
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.