From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6945 invoked by alias); 9 Jul 2012 21:27:43 -0000 Received: (qmail 6934 invoked by uid 22791); 9 Jul 2012 21:27:41 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Jul 2012 21:27:29 +0000 Received: by lbol5 with SMTP id l5so4549718lbo.20 for ; Mon, 09 Jul 2012 14:27:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=DF08TbGmzuqTQDJ2J8cA6dLPK2yRlAZTXIFO+jwX66o=; b=iaLFGbNifkUHw3S/jM5ldxzesAnqllMwXpCuwWVeo+2Uh0OOzfKJmQyQdThjVtK8+a B1dCAsNz1O7vTyjBI/7pN7AHVK8JXRbj5/OvIb6rHzMnlQYT7w0qdHEyW8BCvmdYVz1/ fSyj/qaGaIUhchvtp8xTxwdLCPZilbZj5vstIgVGQV4eAa5dgbdDAuBSI6opjbRBrjUm 9uIoTkX/JUfCiYmGMriyXrYDBiEVeyXeLkNk7ORdvt30U7kEJaTFFr5iQLDC7UEo439H MLbRMEMhJelgOq/RgpS5LyRpJo2LPYgde8ADkQABr+N8DWHZEpUrqLhvYGNECjOdXLIw 9ACw== Received: by 10.112.99.98 with SMTP id ep2mr19646407lbb.45.1341869247786; Mon, 09 Jul 2012 14:27:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.99.98 with SMTP id ep2mr19646390lbb.45.1341869247609; Mon, 09 Jul 2012 14:27:27 -0700 (PDT) Received: by 10.152.130.102 with HTTP; Mon, 9 Jul 2012 14:27:27 -0700 (PDT) In-Reply-To: <4FF96D0C.5060406@redhat.com> References: <20120307004630.A503DB21B6@azwildcat.mtv.corp.google.com> <4FF7D1C6.90407@redhat.com> <4FF96D0C.5060406@redhat.com> Date: Mon, 09 Jul 2012 21:27:00 -0000 Message-ID: Subject: Re: User directed Function Multiversioning via Function Overloading (issue5752064) From: Xinliang David Li To: Jason Merrill 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 Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQlVvh1gIfytZLiEV+Vl1/zqIWhrwop5nuZEr4ZaLKimNPXIGd5ICkXgIP5hfBHsozPERR3S2CnkVqTdQ+7M1oPf30/rFUpHm7YBMN3+E3FwSpWeWgCk2SVYJnSo94hCTOs5/bYTLTwkoURG1jLEfl1GDbmFJwQinZhERehqnAOOhBu7PFv+2sSZ2dgrX27Z0UMY/JR+ X-IsSubscribed: yes 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/msg00349.txt.bz2 Ok. Do you have specific comments on the patch? thanks, David On Sun, Jul 8, 2012 at 4:20 AM, Jason Merrill wrote: > 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