public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org
Subject: Re: Turn HARD_REGNO_CALL_PART_CLOBBERED into a target hook
Date: Mon, 04 Sep 2017 05:48:00 -0000	[thread overview]
Message-ID: <7ca91fef-ae09-7172-05be-75a0374439ae@redhat.com> (raw)
In-Reply-To: <87inh8t7a9.fsf@linaro.org>

On 08/28/2017 02:39 AM, Richard Sandiford wrote:
> The SVE patches change the size of a machine_mode from a compile-time
> constant to a runtime invariant.  However, target-specific code can
> continue to treat the modes as constant-sized if the target only has
> constant-sized modes.
> 
> The main snag with this approach is that target-independent code still
> uses macros from the target .h file.  This patch is one of several that
> converts a target macro to a hook.
> 
> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.
> Also tested by checking that there were no extra warnings or changes in
> testsuite assembly output for at least one target per CPU.  OK to install?
> 
> Richard
> 
> 
> 2017-08-28  Richard Sandiford  <richard.sandiford@linaro.org>
> 	    Alan Hayward  <alan.hayward@arm.com>
> 	    David Sherwood  <david.sherwood@arm.com>
> 
> gcc/
> 	* target.def (hard_regno_call_part_clobbered): New hook.
> 	* doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
> 	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
> 	* doc/tm.texi: Regenerate.
> 	* hooks.h (hook_bool_uint_mode_false): Declare.
> 	* hooks.c (hook_bool_uint_mode_false): New function.
> 	* regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
> 	* cselib.c (cselib_process_insn): Use
> 	targetm.hard_regno_call_part_clobbered instead of
> 	HARD_REGNO_CALL_PART_CLOBBERED.
> 	* ira-conflicts.c (ira_build_conflicts): Likewise.
> 	* ira-costs.c (ira_tune_allocno_costs): Likewise.
> 	* lra-constraints.c (need_for_call_save_p): Likewise.
> 	* lra-lives.c: Include target.h.
> 	(check_pseudos_live_through_calls): Use
> 	targetm.hard_regno_call_part_clobbered instead of
> 	HARD_REGNO_CALL_PART_CLOBBERED.
> 	* regcprop.c: Include target.h.
> 	(copyprop_hardreg_forward_1): Use
> 	targetm.hard_regno_call_part_clobbered instead of
> 	HARD_REGNO_CALL_PART_CLOBBERED.
> 	* reginfo.c (choose_hard_reg_mode): Likewise.
> 	* regrename.c (check_new_reg_p): Likewise.
> 	* reload.c (find_equiv_reg): Likewise.
> 	* reload1.c (emit_reload_insns): Likewise.
> 	* sched-deps.c (deps_analyze_insn): Likewise.
> 	* sel-sched.c (init_regs_for_mode): Likewise.
> 	(mark_unavailable_hard_regs): Likewise.
> 	* targhooks.c (default_dwarf_frame_reg_mode): Likewise.
> 	* config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
> 	* config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
> 	New function.
> 	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
> 	* config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
> 	* config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
> 	Delete.
> 	* config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
> 	and return a bool.
> 	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
> 	* config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
> 	* config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
> 	function.
> 	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
> 	* config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
> 	* config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
> 	function.
> 	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
> 	* config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
> 	Delete.
> 	* config/powerpcspe/powerpcspe.c
> 	(rs6000_hard_regno_call_part_clobbered): New function.
> 	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
> 	* config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
> 	* config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
> 	New function.
> 	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
> 	* config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
> 	* config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
> 	function.
> 	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
> 	* config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
> 	* system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
OK.

jeff

      reply	other threads:[~2017-09-04  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28  9:37 Richard Sandiford
2017-09-04  5:48 ` Jeff Law [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ca91fef-ae09-7172-05be-75a0374439ae@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).