From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20527 invoked by alias); 14 Jun 2012 20:13:36 -0000 Received: (qmail 20500 invoked by uid 22791); 14 Jun 2012 20:13:34 -0000 X-SWARE-Spam-Status: No, hits=-5.3 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-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jun 2012 20:13:20 +0000 Received: by obhx4 with SMTP id x4so3207913obh.20 for ; Thu, 14 Jun 2012 13:13:20 -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:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=Va4DwQ2wip4SV1kq+0m3dV9J581VuuZmkSJMT2tGFXU=; b=AvXy7SP6tDMdNzhsYb9BRyMLMnJ/OSacWLalyNk4UfyXGp+nslBULcOTSciZ7h3sLz vSoUBpzW1IF4ZJuHw73KVJMj8ueFq7oPtPhPkvCxpQfb94Hs/qlcym6jBLfTWrokk8Av pPV/GGari8NCmPr82sus4TUIum5hiYVtRv/x3Df1ihywsCesPItcPvnXSRKMnX+rrhwa CsU5z7lwsZ7+9c3TsENS6vcG/db7i7bzfZAp/vjxd2YbVjTveWwXdlkdbjiERKqqgK6l 3y0xM8AubRb+dJag4Iv8VS+1NainFjLf9QUmTVxcF9V9VAipwx1WFxBi5G7mUiV9KDKH j/Iw== Received: by 10.182.164.102 with SMTP id yp6mr3196162obb.66.1339704800223; Thu, 14 Jun 2012 13:13:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.164.102 with SMTP id yp6mr3196132obb.66.1339704799992; Thu, 14 Jun 2012 13:13:19 -0700 (PDT) Received: by 10.182.62.138 with HTTP; Thu, 14 Jun 2012 13:13:19 -0700 (PDT) In-Reply-To: References: <20120307004630.A503DB21B6@azwildcat.mtv.corp.google.com> Date: Thu, 14 Jun 2012 20:35:00 -0000 Message-ID: Subject: Re: User directed Function Multiversioning via Function Overloading (issue5752064) From: Sriraman Tallam To: jason@redhat.com, mark@codesourcery.com, nathan@codesourcery.com, "H.J. Lu" Cc: Richard Guenther , Jan Hubicka , Uros Bizjak , reply@codereview.appspotmail.com, gcc-patches@gcc.gnu.org, David Li Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQlsDDauYKmFK/wxcvc14LUH813NeF6ufiLH1YGfDuB8V3vnxpS51/YTUKJhwBNxlE4dO0sfylgCD94/qD7jXqMAoRT9pv2Lj3ezFxaVOnXecoFqUS3I4NENPkLYwctgsr5i6ROIFGs67YD6g9ElhmDnpbs6+Q== 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-06/txt/msg00962.txt.bz2 +cc c++ front-end maintainers Hi, C++ Frontend maintainers, Could you please take a look at the front-end part when you find the time? Honza, your thoughts on the callgraph part? Richard, any further comments/feedback? Additionally, I am working on generating better mangled names for function versions, along the lines of C++ thunks. Thanks, -Sri. On Mon, Jun 4, 2012 at 11:59 AM, Sriraman Tallam wrot= e: > Hi, > > =A0 Attaching updated patch for function multiversioning which brings > in plenty of changes. > > * As suggested by Richard earlier, I have made cgraph aware of > function versions. All nodes of function versions are chained and the > dispatcher bodies are created on demand while building cgraph edges. > The dispatcher body will be created if and only if there is a call or > reference to a versioned function. Previously, I was maintaining the > list of versions separately in a hash map, all that is gone now. > * Now, the file multiverison.c has some helper routines that are used > in the context of function versioning. There are no new passes and no > new globals. > * More tests, updated existing tests. > * Fixed lots of bugs. > * Updated patch description. > > Patch attached. Patch also available for review at > http://codereview.appspot.com/5752064 > > Please let me know what you think, > > Thanks, > -Sri. > > > On Mon, May 14, 2012 at 11:28 AM, Sriraman Tallam w= rote: >> Hi H.J, >> >> =A0 Attaching new patch with 2 test cases, mv2.C checks ISAs only and >> mv1.C checks ISAs and arches mixed. Right now, checking only arches is >> not needed as they are mutually exclusive, any order should be fine. >> >> Patch also available for review here: =A0http://codereview.appspot.com/5= 752064 >> >> Thanks, >> -Sri. >> >> On Sat, May 12, 2012 at 6:37 AM, H.J. Lu wrote: >>> On Fri, May 11, 2012 at 7:04 PM, Sriraman Tallam = wrote: >>>> Hi H.J., >>>> >>>> =A0 I have updated the patch to improve the dispatching method like we >>>> discussed. Each feature gets a priority now, and the dispatching is >>>> done in priority order. Please see i386.c for the changes. >>>> >>>> Patch also available for review here: =A0http://codereview.appspot.com= /5752064 >>>> >>> >>> I think you need 3 tests: >>> >>> 1. =A0Only with ISA. >>> 2. =A0Only with arch >>> 3. =A0Mixed with ISA and arch >>> >>> since test mixed ISA and arch may hide issues with ISA only or arch onl= y. >>> >>> -- >>> H.J.