From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3671 invoked by alias); 6 Aug 2007 15:47:36 -0000 Received: (qmail 3597 invoked by uid 22791); 6 Aug 2007 15:47:35 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.191) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 15:47:32 +0000 Received: by nf-out-0910.google.com with SMTP id h3so377662nfh for ; Mon, 06 Aug 2007 08:47:30 -0700 (PDT) Received: by 10.86.68.16 with SMTP id q16mr4443619fga.1186415250182; Mon, 06 Aug 2007 08:47:30 -0700 (PDT) Received: from scientist.local ( [195.176.176.226]) by mx.google.com with ESMTPS id j12sm12882950fkf.2007.08.06.08.47.27 (version=SSLv3 cipher=RC4-MD5); Mon, 06 Aug 2007 08:47:27 -0700 (PDT) Message-ID: <46B7428E.5070902@gnu.org> Date: Mon, 06 Aug 2007 15:47:00 -0000 From: Paolo Bonzini User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Andreas Krebbel CC: gcc-patches@gcc.gnu.org Subject: Re: [RFC,PATCH] Provide get_attr functions with alternative parameter References: <20070806152927.GA3999@blc4eb430604175.ibm.com> In-Reply-To: <20070806152927.GA3999@blc4eb430604175.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2007-08/txt/msg00346.txt.bz2 > The attached patch provides getter functions with an additional > argument specifying the number of the alternative for which the > attribute value should be returned. In order to get the old behaviour > the functions need to be invoked with -1 as alternative number. Inline > wrappers with the old function names are provided in order to keep > backwards compatibility. Interesting! Is there a reason (in the patch you're working on) why the inline wrappers couldn't just do extract_constrain_insn_cached (insn); return get_alt_attr_blah_blah (insn, which_alternative); instead of supporting the special alternative number -1 in get_alt_attr_blah_blah? (I can see the reason could be code bloat, or GCC deciding not to inline get_attr_blah_blah, but I thought I'd just ask). Paolo