From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73244 invoked by alias); 29 Oct 2015 17:02:31 -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 73225 invoked by uid 89); 29 Oct 2015 17:02:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 29 Oct 2015 17:02:28 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id C030A5441DA; Thu, 29 Oct 2015 18:02:24 +0100 (CET) Date: Thu, 29 Oct 2015 17:07:00 -0000 From: Jan Hubicka To: Evgeny Stupachenko Cc: Jeff Law , Jan Hubicka , Bernd Schmidt , Bernd Schmidt , GCC Patches Subject: Re: [PATCH] New attribute to create target clones Message-ID: <20151029170224.GB37773@kam.mff.cuni.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-10/txt/msg03233.txt.bz2 > 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..." I will look at the rest of the patch at evening. Honza > > Thanks, > Evgeny > > > > > > Jeff