[{"id":1767416,"web_url":"http://patchwork.ozlabs.org/comment/1767416/","msgid":"<f22ffcb4-a35c-8cde-7287-59eae2e31305@redhat.com>","list_archive_url":null,"date":"2017-09-12T22:33:54","subject":"Re: Turn SECONDARY_MEMORY_NEEDED into a hook","submitter":{"id":4400,"url":"http://patchwork.ozlabs.org/api/people/4400/","name":"Jeff Law","email":"law@redhat.com"},"content":"On 09/12/2017 12:50 PM, Richard Sandiford wrote:\n> Since the patch is going through all the definitions anyway, it seemed\n> like a good opportunity to put the mode argument first, to match the\n> order for register_move_cost.\n> \n> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.\n> Also tested by comparing the testsuite assembly output on at least one\n> target per CPU directory.  OK to install?\n> \n> Richard\n> \n> \n> 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>\n> \t    Alan Hayward  <alan.hayward@arm.com>\n> \t    David Sherwood  <david.sherwood@arm.com>\n> \n> gcc/\n> \t* target.def (secondary_memory_needed): New hook.\n> \t(secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED\n> \tinstead of SECONDARY_MEMORY_NEEDED.\n> \t(secondary_memory_needed_mode): Likewise.\n> \t* hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.\n> \t* hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.\n> \t* doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...\n> \t(TARGET_SECONDARY_MEMORY_NEEDED): ...this.\n> \t(SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.\n> \t* doc/tm.texi: Regenerate.\n> \t* config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/alpha/alpha.c (alpha_secondary_memory_needed): New function.\n> \t(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t* config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.\n> \t* config/i386/i386.c (inline_secondary_memory_needed): Put the\n> \tmode argument first and change the reg_class arguments to reg_class_t.\n> \t(ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.\n> \tMake static.  Update the call to inline_secondary_memory_needed.\n> \t(ix86_register_move_cost): Update the call to\n> \tinline_secondary_memory_needed.\n> \t(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t* config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out\n> \tdefinition.\n> \t* config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to\n> \tTARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED\n> \tin comment.\n> \t* config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.\n> \t* config/mips/mips.c (mips_secondary_memory_needed): Make static\n> \tand match hook interface.  Add comment from mips.h.\n> \t(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t* config/mmix/mmix.md (truncdfsf2): Refer to\n> \tTARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED\n> \tin comment.\n> \t* config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...\n> \t(PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.\n> \t* config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t(pa_secondary_memory_needed): New function.\n> \t* config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.\n> \t* config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t(pdp11_secondary_memory_needed): Make static and match hook interface.\n> \t* config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/powerpcspe/powerpcspe-protos.h\n> \t(rs6000_secondary_memory_needed_ptr): Delete.\n> \t* config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):\n> \tDelete.\n> \t(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t(rs6000_option_override_internal): Assign to\n> \ttargetm.secondary_memory_needed rather than\n> \trs6000_secondary_memory_needed_ptr.\n> \t(rs6000_secondary_memory_needed): Match hook interface.\n> \t(rs6000_debug_secondary_memory_needed): Likewise.\n> \t* config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/riscv/riscv.c (riscv_secondary_memory_needed): New function.\n> \t(riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.\n> \t(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t* config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):\n> \tDelete.\n> \t* config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.\n> \t(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t(rs6000_option_override_internal): Assign to\n> \ttargetm.secondary_memory_needed rather than\n> \trs6000_secondary_memory_needed_ptr.\n> \t(rs6000_secondary_memory_needed): Match hook interface.\n> \t(rs6000_debug_secondary_memory_needed): Likewise.\n> \t* config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/s390/s390.c (s390_secondary_memory_needed): New function.\n> \t(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t* config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.\n> \t* config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.\n> \t(sparc_secondary_memory_needed): New function.\n> \t* lra-constraints.c (check_and_process_move): Refer to\n> \tTARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED\n> \tin comment.\n> \t(curr_insn_transform): Likewise.\n> \t(process_alt_operands): Use targetm.secondary_memory_needed\n> \tinstead of TARGET_SECONDARY_MEMORY_NEEDED.\n> \t(check_secondary_memory_needed_p): Likewise.\n> \t(choose_split_class): Likewise.\n> \t* reload.c: Unconditionally include code that was previously\n> \tconditional on SECONDARY_MEMORY_NEEDED.\n> \t(push_secondary_reload): Use targetm.secondary_memory_needed\n> \tinstead of TARGET_SECONDARY_MEMORY_NEEDED.\n> \t(push_reload): Likewise.\n> \t* reload1.c: Unconditionally include code that was previously\n> \tconditional on SECONDARY_MEMORY_NEEDED.\n> \t(choose_reload_regs): Use targetm.secondary_memory_needed\n> \tinstead of TARGET_SECONDARY_MEMORY_NEEDED.\n> \t(gen_reload): Likewise.\n> \t* system.h (SECONDARY_MEMORY_NEEDED): Poison.\nOK.\njeff","headers":{"Return-Path":"<gcc-patches-return-461993-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461993-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"W0KEtuG4\"; dkim-atps=neutral","sourceware.org; auth=none","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=law@redhat.com"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsKN50XN8z9t39\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 08:34:12 +1000 (AEST)","(qmail 93851 invoked by alias); 12 Sep 2017 22:33:59 -0000","(qmail 93841 invoked by uid 89); 12 Sep 2017 22:33:59 -0000","from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 12 Sep 2017 22:33:57 +0000","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com\n\t[10.5.11.14])\t(using TLSv1.2 with cipher AECDH-AES256-SHA\n\t(256/256 bits))\t(No client certificate requested)\tby\n\tmx1.redhat.com (Postfix) with ESMTPS id 333F34ACA4;\n\tTue, 12 Sep 2017 22:33:56 +0000 (UTC)","from localhost.localdomain (ovpn-112-10.rdu2.redhat.com\n\t[10.10.112.10])\tby smtp.corp.redhat.com (Postfix) with ESMTP\n\tid 2E89A60C20; Tue, 12 Sep 2017 22:33:54 +0000 (UTC)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type:content-transfer-encoding; q=dns; s=\n\tdefault; b=A/7swPph2OMYiDhh3k3IhgbhJXFxUWvxSCRzHOtAYAvU4/pqt8BkZ\n\ti3vvXt9YQdTCaVdJmZYDW6zgWzGAwGFXi9v/qlZCHbxt/ARg3FlupZTdM7qd124L\n\tJTw/mhmYy+26itKYYPkKZ9ByTzWNlOf07SD0FxDcVnd7Y6n2QC+Wv0=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type:content-transfer-encoding; s=default;\n\tbh=cPiTt5llIVhem3/zanAjOSBuWPI=; b=W0KEtuG4VL6tWBmJmXybrESI/N9O\n\tWimhcz2XEAekpafEujoMgisFZ0kq04Gt4WjYbRo/KsUPZd0w4XGEo1s8X7cseTM6\n\tonhrAWI6uqzSVauNeNEeA+KaOFWk73qaJ8jo8uqjPZtXR7paxRans/JlgOocae52\n\tOSkrOXjbzUe24ds=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-0.9 required=5.0 tests=BAYES_00,\n\tKAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=no version=3.3.2 spammy=","X-HELO":"mx1.redhat.com","DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 333F34ACA4","Subject":"Re: Turn SECONDARY_MEMORY_NEEDED into a hook","To":"gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org","References":"<87shfrah0k.fsf@linaro.org>","From":"Jeff Law <law@redhat.com>","Message-ID":"<f22ffcb4-a35c-8cde-7287-59eae2e31305@redhat.com>","Date":"Tue, 12 Sep 2017 16:33:54 -0600","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<87shfrah0k.fsf@linaro.org>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"7bit","X-IsSubscribed":"yes"}}]