From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19079 invoked by alias); 5 Oct 2012 17:44:09 -0000 Received: (qmail 19070 invoked by uid 22791); 5 Oct 2012 17:44:08 -0000 X-SWARE-Spam-Status: No, hits=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,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; Fri, 05 Oct 2012 17:44:03 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q95Hhxod001248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 5 Oct 2012 13:44:00 -0400 Received: from [10.3.113.34] (ovpn-113-34.phx2.redhat.com [10.3.113.34]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q95HhwVI011862; Fri, 5 Oct 2012 13:43:58 -0400 Message-ID: <506F1C5D.9060500@redhat.com> Date: Fri, 05 Oct 2012 17:44:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Sriraman Tallam CC: Xinliang David Li , 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> <4FF96D0C.5060406@redhat.com> <4FFBF9F5.6020306@redhat.com> <5008708E.1030109@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/msg00542.txt.bz2 On 08/24/2012 08:34 PM, Sriraman Tallam wrote: > + /* If the address of a multiversioned function dispatcher is taken, > + generate the body to dispatch the right function at run-time. This > + is needed as the address can be used to do an indirect call. */ It seems to me that you don't need a dispatcher for doing indirect calls; you could just take the address of the version you would choose if you were doing a direct call. The only reason for a dispatcher I can think of is if you want the address of a function to compare equal across translation units compiled with different target flags. I'm not sure that's necessary; am I missing something? Continuing to look at the patch. Jason