From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55950 invoked by alias); 30 Oct 2015 05:28:02 -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 55451 invoked by uid 89); 30 Oct 2015 05:28:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham 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; Fri, 30 Oct 2015 05:28:00 +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 281E38E37E; Fri, 30 Oct 2015 05:27:59 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-196.phx2.redhat.com [10.3.113.196]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9U5Rwql002143; Fri, 30 Oct 2015 01:27:58 -0400 Subject: Re: [PATCH] New attribute to create target clones To: Evgeny Stupachenko , Jan Hubicka References: <5616C9CA.2010702@redhat.com> <20151008213644.GD5527@kam.mff.cuni.cz> <5617FD1D.9010406@redhat.com> <20151009182753.GA7750@kam.mff.cuni.cz> <20151009200422.GA23615@kam.mff.cuni.cz> <562E4BB1.3050606@redhat.com> <20151029170224.GB37773@kam.mff.cuni.cz> Cc: Bernd Schmidt , Bernd Schmidt , GCC Patches From: Jeff Law Message-ID: <5632FFDD.6080303@redhat.com> Date: Fri, 30 Oct 2015 05:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg03314.txt.bz2 On 10/29/2015 12:13 PM, Evgeny Stupachenko wrote: > On Thu, Oct 29, 2015 at 8:02 PM, Jan Hubicka wrote: >>> >>Yes. This is not necessary. However that way we'll have the following >>> >>code in dispatcher: >>> >> cmpl $6, __cpu_model+4(%rip) >>> >> sete %al >>> >> movzbl %al, %eax >>> >> testl %eax, %eax >>> >> jle .L16 >>> >> movl $foo.target_clone.1, %eax >>> >>I think it is very hard to read and debug such... >>> >> >>> >>While now we have: >>> >> >>> >> cmpl $6, __cpu_model+4(%rip) >>> >> sete %al >>> >> movzbl %al, %eax >>> >> testl %eax, %eax >>> >> jle .L16 >>> >> movl $foo.arch_slm, %eax >>> >> >>> >>and it is clear that we are jumping to SLM code here. >>> >>I'd like to keep target in names. >> > >> >I am not against more informative names, but why you don't pass the info here: >> > >> >+create_target_clone (cgraph_node *node, bool definition) >> >+{ >> >+ cgraph_node *new_node; >> >+ if (definition) >> >+ { >> >+ new_node = node->create_version_clone_with_body (vNULL, NULL, >> >+ NULL, false, >> >+ NULL, NULL, >> >+ "target_clone"); >> >+ new_node->force_output = true; >> >+ } >> >+ else >> >+ { >> >+ tree new_decl = copy_node (node->decl); >> >+ new_node = cgraph_node::get_create (new_decl); >> >+ } >> >+ return new_node; >> >+} >> > >> >passing "arch_slm" instead of target_clone will get you the name you want >> >(plus the extra index that may be needed anyway to disambiguate). >> > >> >Note that in general those .suffixes should be machine parseable, so cp-demangle.c >> >can expand them correctly. We may want to have some consistent grammar for them here >> >and update cp-demangle.c to output nice info like "target clone for..." > Ok. I've modified the patch correspondingly. You'll need updated ChangeLog entries. Don't forget to drop the omp-low spurious whitespace change. You should also fix the formatting nits Jan pointed out. With those changes, this patch is OK for the trunk. I'll run the header file reordering & cleanup tool after the patch is committed to the trunk. jeff