From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13750 invoked by alias); 31 Oct 2012 14:25:24 -0000 Received: (qmail 13737 invoked by uid 22791); 31 Oct 2012 14:25:23 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Wed, 31 Oct 2012 14:25:13 +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 q9VEPBLd002045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 31 Oct 2012 10:25:13 -0400 Received: from [10.3.113.101] (ovpn-113-101.phx2.redhat.com [10.3.113.101]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9VE2Lof016898; Wed, 31 Oct 2012 10:02:21 -0400 Message-ID: <50912F66.3030707@redhat.com> Date: Wed, 31 Oct 2012 14:27:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Sriraman Tallam CC: gcc-patches List , Jan Hubicka , Diego Novillo Subject: Re: User directed Function Multiversioning via Function Overloading (issue5752064) References: <5008708E.1030109@redhat.com> <506F27AF.3070805@redhat.com> <50816D63.3020908@google.com> <20121026155447.GA4348@atrey.karlin.mff.cuni.cz> <50902624.3020705@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-10/txt/msg02945.txt.bz2 On 10/30/2012 05:49 PM, Sriraman Tallam wrote: > AFAIU, this should not be a problem. For duplicate declarations, > duplicate_decls should merge them and they should never be seen here. > Did I miss something? With extern "C" functions you can have multiple declarations of the same function in different namespaces that are not duplicates, but still match. And I can't think what that test is supposed to be catching, anyway. > No, I thought about this but I did not want to handle this case in > this iteration. The dispatcher is created only once and if more > functions are declared later, they will not be dispatched atleast in > this iteration. I still think that instead of collecting the set of functions in overload resolution, they should be collected at declaration time and added to a vector in the cgraph information for use when generating the body of the dispatcher. > You talked about doing the dispatcher > building later, but I did it here since I am doing it only once. I still don't think this is the right place for it. > dispatcher_node does not have a body until it is generated in > cgraphunit.c, so cgraph does not mark this field before this is > processed in cgraph_analyze_function. That seems like something to address in your cgraph changes. Jason