From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110271 invoked by alias); 22 Sep 2015 21:09:16 -0000 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 Received: (qmail 110235 invoked by uid 89); 22 Sep 2015 21:09:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 22 Sep 2015 21:09:13 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id C613D461C2; Tue, 22 Sep 2015 21:09:11 +0000 (UTC) Received: from localhost.localdomain (vpn1-5-31.ams2.redhat.com [10.36.5.31]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8ML99Bn005725; Tue, 22 Sep 2015 17:09:10 -0400 Subject: Re: [PATCH] New attribute to create target clones To: Jeff Law , Bernd Schmidt , Evgeny Stupachenko , GCC Patches , Jan Hubicka References: <56000538.5000800@t-online.de> <5601AEDB.4000100@redhat.com> From: Bernd Schmidt Message-ID: <5601C375.5050706@redhat.com> Date: Tue, 22 Sep 2015 21:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5601AEDB.4000100@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg01697.txt.bz2 On 09/22/2015 09:41 PM, Jeff Law wrote: > Essentially it allows us to more easily support > per-microarchitecture-optimized versions of functions. You list just > have to list the microarchitectures and the compiler handles the rest. > Very simple, very easy. I'd think it'd be particularly helpful for > vectorization. > > You could emulate this with compiling the same source multiple times > with different flags/defines and wire up on ifunc by hand. But Evgeny's > approach is vastly simpler. As far as I can tell the ifunc is generated automatically (and the functionality is documented as such), so the new target_clone doesn't buy much. But one thing I didn't was that the existing support is only available in C++, while Evgeny's patch works for C. That is probably an argument that could be made for its inclusion. Or at least, it's supposed to work. As I said, I get verify_ssa failures on the included testcases, and for a simpler one I just tried I get the clones of the function, but not the resolver that ought to be generated. Bernd