From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12778 invoked by alias); 8 Jul 2012 11:21:10 -0000 Received: (qmail 12767 invoked by uid 22791); 8 Jul 2012 11:21:08 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 Jul 2012 11:20:53 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q68BKmjm015080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 Jul 2012 07:20:48 -0400 Received: from [10.3.113.26] (ovpn-113-26.phx2.redhat.com [10.3.113.26]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q68BKiYF000384; Sun, 8 Jul 2012 07:20:45 -0400 Message-ID: <4FF96D0C.5060406@redhat.com> Date: Sun, 08 Jul 2012 11:21:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Xinliang David Li CC: Sriraman Tallam , mark@codesourcery.com, nathan@codesourcery.com, "H.J. Lu" , Richard Guenther , Jan Hubicka , Uros Bizjak , reply@codereview.appspotmail.com, gcc-patches@gcc.gnu.org Subject: Re: User directed Function Multiversioning via Function Overloading (issue5752064) References: <20120307004630.A503DB21B6@azwildcat.mtv.corp.google.com> <4FF7D1C6.90407@redhat.com> In-Reply-To: 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: 2012-07/txt/msg00292.txt.bz2 On 07/07/2012 08:38 PM, Xinliang David Li wrote: >> It seems to me that what you have here are target-specific attributes that >> affect the signature of a function such that they make two declarations >> different that would otherwise declare the same function. Stepping away from >> the specific notion of versioning, it seems that these are the questions >> that you want the front end to be able to ask about these attributes: >> >> * Does this attribute affect a function signature? > > The question becomes if a caller 'bar' with target attribute 'x' can > make a call to a function 'foo' with an incompatible target attribute > 'y'. If the answer is no, then the target attribute is part of 'foo's > signature. I think the answer is yes -- the attribute affects a > function signature. Yes, clearly the answer is yes for the target attribute. But I wasn't asking someone to answer those questions; I was saying that those are the questions the front end needs to be able to ask of the back end in order to implement this functionality in a more generic way. Jason