From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5217 invoked by alias); 11 Sep 2017 22:31:55 -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 5207 invoked by uid 89); 11 Sep 2017 22:31:54 -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, 11 Sep 2017 22:31:53 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F0B795C5; Mon, 11 Sep 2017 22:31:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F0B795C5 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law@redhat.com Received: from localhost.localdomain (ovpn-112-17.rdu2.redhat.com [10.10.112.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7149B600C4; Mon, 11 Sep 2017 22:31:45 +0000 (UTC) Subject: Re: Turn SLOW_UNALIGNED_ACCESS into a target hook To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org References: <878thlduq4.fsf@linaro.org> From: Jeff Law Message-ID: <0c1a5914-6565-fd66-d14e-1408e5308f95@redhat.com> Date: Mon, 11 Sep 2017 22:31: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: <878thlduq4.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00641.txt.bz2 On 09/11/2017 11:13 AM, Richard Sandiford wrote: > Pretty mechanical conversion. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. > Also tested by comparing the testsuite assembly output on at least one > target per CPU directory. OK to install? > > Richard > > > 2017-09-11 Richard Sandiford > Alan Hayward > David Sherwood > > gcc/ > * defaults.h (SLOW_UNALIGNED_ACCESS): Delete. > * target.def (slow_unaligned_access): New hook. > * targhooks.h (default_slow_unaligned_access): Declare. > * targhooks.c (default_slow_unaligned_access): New function. > * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with... > (TARGET_SLOW_UNALIGNED_ACCESS): ...this. > * doc/tm.texi: Regenerate. > * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete. > * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete. > * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out > definition. > * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete. > * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS): > Redefine. > (rs6000_slow_unaligned_access): New function. > (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS. > (expand_block_compare): Likewise. > (expand_strn_compare): Likewise. > (rs6000_rtx_costs): Likewise. > * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete. > (riscv_slow_unaligned_access): Likewise. > * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to... > (riscv_slow_unaligned_access_p): ...this and make static. > (riscv_option_override): Update accordingly. > (riscv_slow_unaligned_access): New function. > (TARGET_SLOW_UNALIGNED_ACCESS): Redefine. > * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete. > * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine. > (rs6000_slow_unaligned_access): New function. > (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS. > (rs6000_rtx_costs): Likewise. > * config/rs6000/rs6000-string.c (expand_block_compare) > (expand_strn_compare): Use targetm.slow_unaligned_access instead > of SLOW_UNALIGNED_ACCESS. > * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete. > * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete. > * calls.c (expand_call): Use targetm.slow_unaligned_access instead > of SLOW_UNALIGNED_ACCESS. > * expmed.c (simple_mem_bitfield_p): Likewise. > * expr.c (alignment_for_piecewise_move): Likewise. > (emit_group_load_1): Likewise. > (emit_group_store): Likewise. > (copy_blkmode_from_reg): Likewise. > (emit_push_insn): Likewise. > (expand_assignment): Likewise. > (store_field): Likewise. > (expand_expr_real_1): Likewise. > * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise. > * lra-constraints.c (simplify_operand_subreg): Likewise. > * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise. > * gimple-ssa-store-merging.c: Likewise in block comment at start > of file. > * tree-ssa-strlen.c: Include target.h. > (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead > of SLOW_UNALIGNED_ACCESS. > * system.h (SLOW_UNALIGNED_ACCESS): Poison. OK jeff