From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38777 invoked by alias); 4 Sep 2017 05:48:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 38725 invoked by uid 89); 4 Sep 2017 05:48:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Sep 2017 05:48:24 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CD92C0587F8; Mon, 4 Sep 2017 05:48:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2CD92C0587F8 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law@redhat.com Received: from localhost.localdomain (ovpn-112-3.rdu2.redhat.com [10.10.112.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12A4161996; Mon, 4 Sep 2017 05:48:18 +0000 (UTC) Subject: Re: Turn HARD_REGNO_CALL_PART_CLOBBERED into a target hook To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org References: <87inh8t7a9.fsf@linaro.org> From: Jeff Law Message-ID: <7ca91fef-ae09-7172-05be-75a0374439ae@redhat.com> Date: Mon, 04 Sep 2017 05:48:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <87inh8t7a9.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00136.txt.bz2 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 > Alan Hayward > David Sherwood > > 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