From patchwork Thu May 24 18:38:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rong Xu X-Patchwork-Id: 161188 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 40049B6EE7 for ; Fri, 25 May 2012 04:39:28 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1338489569; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:To:Subject:Message-Id:Date: From:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=F/HtVkh E5gI/9cyXATxY3if7tjc=; b=SvH0BHaY/ZAW3yhYWtZnNsMkKM2HlrK05ECgI0Z 4kUcM0Gjm1NTitRMTifg0N69mynEHP8CihJSX8SaaJlTObHRYXh5ywF3MoUrkqw/ zyauDV52d7tC/t4GpGBidFGbhQw8x3ygpDiRGkiPgiC4EJCrVozlxxqCpDzbTXy0 WIbg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:Received:Received:To:Subject:Message-Id:Date:From:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=TSXnlY11JzbqFooEXDPs/OlqbG0JcadntB6JPQWM3VUeC1YacIfkXzaHf5vJ3t +wWim0Aa23i4ieJ1RTlLPLnM8N15puhqk6fEzwJEVfamYmCMcwjWmrxgUX4EM1Lb xMWSQVZqoSCw8Y2Mb2OBhmEIXdRiQw0ZWUiUahAO3P8f0=; Received: (qmail 16253 invoked by alias); 24 May 2012 18:39:16 -0000 Received: (qmail 16064 invoked by uid 22791); 24 May 2012 18:39:14 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qc0-f201.google.com (HELO mail-qc0-f201.google.com) (209.85.216.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 May 2012 18:38:59 +0000 Received: by qcse14 with SMTP id e14so15487qcs.2 for ; Thu, 24 May 2012 11:38:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=to:subject:message-id:date:from:x-gm-message-state; bh=zAJysB1faeMu4QFMXbvYQClHg734ezr2iQRo6/nHj58=; b=IDDF7cNVz2Yqfo/EI/FhrevhaENkc0PyBIEn3flBD6bOYZimGxwJS94tnhazvTqZnL c8Agh+OjyaOQYu5dz8o9Ce/iyWPDun+1IS94njxxJLBr4EfLNbf00Y3vhqNx1QtQzbPo DMYRMLGwyEzrCBE0OFGydzsGVkMt4kHuH8YuRU7vCeovK+fFriqSzv5XIDwbPsQiUjGu /G71Jz/Gobf9LEbdhvLZjG/AC/IE+1oOYMLpMnXfHsC/jmB2TSPh1VOKal2CrijJGexQ /DXPeTK7P2FUBSAqocd7oyA+tORQeTuDzxPDYl9gVJOW9KOG52XSgYvlttPo9KHc9n/7 gW1Q== Received: by 10.236.73.131 with SMTP id v3mr526499yhd.6.1337884738683; Thu, 24 May 2012 11:38:58 -0700 (PDT) Received: by 10.236.73.131 with SMTP id v3mr526493yhd.6.1337884738639; Thu, 24 May 2012 11:38:58 -0700 (PDT) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id f27si28186anj.1.2012.05.24.11.38.58 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 24 May 2012 11:38:58 -0700 (PDT) Received: from rong.mtv.corp.google.com (rong.mtv.corp.google.com [172.18.110.233]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 85ABB1E00E8; Thu, 24 May 2012 11:38:58 -0700 (PDT) Received: by rong.mtv.corp.google.com (Postfix, from userid 104659) id 1C613C1B3C; Thu, 24 May 2012 11:38:57 -0700 (PDT) To: reply@codereview.appspotmail.com, davidxl@google.com, gcc-patches@gcc.gnu.org Subject: [google] make the temp names in FDO/LIPO demanglable (issue6251048) Message-Id: <20120524183858.1C613C1B3C@rong.mtv.corp.google.com> Date: Thu, 24 May 2012 11:38:57 -0700 (PDT) From: xur@google.com (Rong Xu) X-Gm-Message-State: ALoCoQkc036m1UM4SHY21twRWu5xp6s989+hWY8u5BFukdhYnw+GsGMzdxE0/LwtKKhx1y/bIuX6hS8I0DgAZ9wLbp8LRjOujaAZsIXfbaKggLySzNG3qQOlsVU0Yeq/hvNok3fUVYPM6XREc34eTBmMkZyt+O9RqA== X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, This is for google branches only. It changes the format of the temp function name so that they can be demangled. Tested with regression tests. Google ref b/5733865. Thanks, 2012-05-24 Rong Xu * l-ipo.c (create_unique_name): Make temp names demanglable. --- This patch is available for review at http://codereview.appspot.com/6251048 Index: l-ipo.c =================================================================== --- l-ipo.c (revision 187817) +++ l-ipo.c (working copy) @@ -1726,15 +1726,15 @@ create_unique_name (tree decl, unsigned module_id) char *n; unsigned fno = FUNC_DECL_FUNC_ID (context); n = (char *)alloca (strlen (name) + 15); - sprintf (n, "%s_%u", name, fno); + sprintf (n, "%s.%u", name, fno); name = n; } assembler_name = (char*) alloca (strlen (name) + 30); - sprintf (assembler_name, "%s_cmo_%u", name, module_id); + sprintf (assembler_name, "%s.cmo.%u", name, module_id); seq = get_name_seq_num (assembler_name); if (seq) - sprintf (assembler_name, "%s_%d", assembler_name, seq); + sprintf (assembler_name, "%s.%d", assembler_name, seq); assemb_id = get_identifier (assembler_name);