From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31258 invoked by alias); 21 Oct 2014 14:57:09 -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 31241 invoked by uid 89); 21 Oct 2014 14:57:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 21 Oct 2014 14:57:07 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9LEuvuN004927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 21 Oct 2014 10:56:58 -0400 Received: from topor.usersys.redhat.com ([10.15.16.142]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9LEuvxG002827; Tue, 21 Oct 2014 10:56:57 -0400 Message-ID: <54467439.1040303@redhat.com> Date: Tue, 21 Oct 2014 14:57:00 -0000 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, ubizjak@gmail.com, markus@trippelsdorf.de, Ganesh.Gopalasubramanian@amd.com, richard.sandiford@arm.com Subject: Re: [PATCH 2/5] Add preferred_for_{size,speed} attributes References: <87bnpabvvx.fsf@e105548-lin.cambridge.arm.com> <87zjcuah0u.fsf@e105548-lin.cambridge.arm.com> In-Reply-To: <87zjcuah0u.fsf@e105548-lin.cambridge.arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg02099.txt.bz2 On 10/17/2014 10:48 AM, Richard Sandiford wrote: > This is the main patch, to add new preferred_for_size and > preferred_for_speed attributes that can be used to selectively disable > alternatives when optimising for size or speed. As explained in the > docs, the new attributes are just optimisation hints and it is possible > that "size-only" alternatives will sometimes end up in a block that's > optimised for speed, or vice versa. > > The patch deals with code that directly accesses the enabled_attributes > mask and that ought to take size/speed choices into account. The next > patch deals with indirect uses. Note that I'm not making reload support > these attributes for hopefully obvious reasons :-) > > Richard > > > gcc/ > * doc/md.texi: Document "preferred_for_size" and "preferred_for_speed" > attributes. > * genattr.c (main): Handle "preferred_for_size" and > "preferred_for_speed" in the same way as "enabled". > * recog.h (bool_attr): New enum. > (target_recog): Replace x_enabled_alternatives with x_bool_attr_masks. > (get_preferred_alternatives, check_bool_attrs): Declare. > * recog.c (have_bool_attr, get_bool_attr, get_bool_attr_mask_uncached) > (get_bool_attr_mask, get_preferred_alternatives, check_bool_attrs): > New functions. > (get_enabled_alternatives): Use get_bool_attr_mask. > * ira-costs.c (record_reg_classes): Use get_preferred_alternatives > instead of recog_data.enabled_alternatives. > * ira.c (ira_setup_alts): Likewise. > * postreload.c (reload_cse_simplify_operands): Likewise. > * config/i386/i386.c (ix86_legitimate_combined_insn): Likewise. > * ira-lives.c (preferred_alternatives): New variable. > (process_bb_node_lives): Set it. > (check_and_make_def_conflict, make_early_clobber_and_input_conflicts) > (single_reg_class, ira_implicitly_set_insn_hard_regs): Use it instead > of recog_data.enabled_alternatives. > * lra-int.h (lra_insn_recog_data): Replace enabled_alternatives > to preferred_alternatives. > * lra-constraints.c (process_alt_operands): Update accordingly. > * lra.c (lra_set_insn_recog_data): Likewise. > (lra_update_insn_recog_data): Assert check_bool_attrs. > > Thanks for picking this up and making a systematic solution, Richard.=20 All RA-related changes are ok for me. I guess other changes (genattrr.c, recog.[ch], md.texi and i386.c) are obvious but I have no power to approve them.