aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/tm.texi
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@marvell.com>2019-01-11 16:50:17 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2019-01-11 16:50:17 +0000
commit473574ee05f41d301c44713323b92a872f395508 (patch)
tree3ea1e075f7dbc24d457868f43921885fc322b63a /gcc/doc/tm.texi
parent134a6f7b107d265cfc55fd07744d9b8fd0283a0e (diff)
downloadgcc-473574ee05f41d301c44713323b92a872f395508.zip
gcc-473574ee05f41d301c44713323b92a872f395508.tar.gz
gcc-473574ee05f41d301c44713323b92a872f395508.tar.bz2
aarch64.c (aarch64_simd_call_p): New function.
2019-01-11 Steve Ellcey <sellcey@marvell.com> * config/aarch64/aarch64.c (aarch64_simd_call_p): New function. (aarch64_hard_regno_call_part_clobbered): Add insn argument. (aarch64_return_call_with_max_clobbers): New function. (TARGET_RETURN_CALL_WITH_MAX_CLOBBERS): New macro. * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Add insn argument. * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): Ditto. * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Ditto. * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered): Ditto. * config/s390/s390.c (s390_hard_regno_call_part_clobbered): Ditto. * cselib.c (cselib_process_insn): Add argument to targetm.hard_regno_call_part_clobbered call. * ira-conflicts.c (ira_build_conflicts): Ditto. * ira-costs.c (ira_tune_allocno_costs): Ditto. * lra-constraints.c (inherit_reload_reg): Ditto. * lra-int.h (struct lra_reg): Add call_insn field, remove call_p field. * lra-lives.c (check_pseudos_live_through_calls): Add call_insn argument. Call targetm.return_call_with_max_clobbers. Add argument to targetm.hard_regno_call_part_clobbered call. (calls_have_same_clobbers_p): New function. (process_bb_lives): Add call_insn and last_call_insn variables. Pass call_insn to check_pseudos_live_through_calls. Modify if stmt to check targetm.return_call_with_max_clobbers. Update setting of flush variable. (lra_create_live_ranges_1): Set call_insn to NULL instead of call_p to false. * lra.c (initialize_lra_reg_info_element): Set call_insn to NULL. * regcprop.c (copyprop_hardreg_forward_1): Add argument to targetm.hard_regno_call_part_clobbered call. * reginfo.c (choose_hard_reg_mode): Ditto. * regrename.c (check_new_reg_p): Ditto. * reload.c (find_equiv_reg): Ditto. * reload1.c (emit_reload_insns): Ditto. * sched-deps.c (deps_analyze_insn): Ditto. * sel-sched.c (init_regs_for_mode): Ditto. (mark_unavailable_hard_regs): Ditto. * targhooks.c (default_dwarf_frame_reg_mode): Ditto. * target.def (hard_regno_call_part_clobbered): Add insn argument. (return_call_with_max_clobbers): New target function. * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_RETURN_CALL_WITH_MAX_CLOBBERS): New hook. * hooks.c (hook_bool_uint_mode_false): Change to hook_bool_insn_uint_mode_false. * hooks.h (hook_bool_uint_mode_false): Ditto. From-SVN: r267848
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r--gcc/doc/tm.texi22
1 files changed, 18 insertions, 4 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index daf29f0..07a4442 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -1894,12 +1894,14 @@ of @code{CALL_USED_REGISTERS}.
@cindex call-used register
@cindex call-clobbered register
@cindex call-saved register
-@deftypefn {Target Hook} bool TARGET_HARD_REGNO_CALL_PART_CLOBBERED (unsigned int @var{regno}, machine_mode @var{mode})
+@deftypefn {Target Hook} bool TARGET_HARD_REGNO_CALL_PART_CLOBBERED (rtx_insn *@var{insn}, unsigned int @var{regno}, machine_mode @var{mode})
This hook should return true if @var{regno} is partly call-saved and
partly call-clobbered, and if a value of mode @var{mode} would be partly
-clobbered by a call. For example, if the low 32 bits of @var{regno} are
-preserved across a call but higher bits are clobbered, this hook should
-return true for a 64-bit mode but false for a 32-bit mode.
+clobbered by call instruction @var{insn}. If @var{insn} is NULL then it
+should return true if any call could partly clobber the register.
+For example, if the low 32 bits of @var{regno} are preserved across a call
+but higher bits are clobbered, this hook should return true for a 64-bit
+mode but false for a 32-bit mode.
The default implementation returns false, which is correct
for targets that don't have partly call-clobbered registers.
@@ -1917,6 +1919,18 @@ This hook removes registers from the set of call-clobbered registers
Defining the hook is purely an optimization.
@end deftypefn
+@deftypefn {Target Hook} {rtx_insn *} TARGET_RETURN_CALL_WITH_MAX_CLOBBERS (rtx_insn *@var{call_1}, rtx_insn *@var{call_2})
+This hook returns a pointer to the call that partially clobbers the
+most registers. If a platform supports multiple ABIs where the registers
+that are partially clobbered may vary, this function compares two
+calls and returns a pointer to the one that clobbers the most registers.
+If both calls clobber the same registers, @var{call_1} must be returned.
+
+The registers clobbered in different ABIs must be a proper subset or
+superset of all other ABIs. @var{call_1} must always be a call insn,
+call_2 may be NULL or a call insn.
+@end deftypefn
+
@findex fixed_regs
@findex call_used_regs
@findex global_regs