From patchwork Tue Jun 7 23:45:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinliang David Li X-Patchwork-Id: 99349 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 4FCBBB6FCA for ; Wed, 8 Jun 2011 09:46:32 +1000 (EST) Received: (qmail 29011 invoked by alias); 7 Jun 2011 23:46:31 -0000 Received: (qmail 29002 invoked by uid 22791); 7 Jun 2011 23:46:30 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 23:46:16 +0000 Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p57NkEB3031498; Tue, 7 Jun 2011 16:46:14 -0700 Received: from syzygy.mtv.corp.google.com (syzygy.mtv.corp.google.com [172.18.110.229]) by kpbe14.cbf.corp.google.com with ESMTP id p57NjtH6024714; Tue, 7 Jun 2011 16:45:55 -0700 Received: by syzygy.mtv.corp.google.com (Postfix, from userid 74076) id 6EE10208C2; Tue, 7 Jun 2011 16:45:50 -0700 (PDT) To: reply@codereview.appspotmail.com, gcc-patches@gcc.gnu.org Subject: [google] add module id in function header dump for lipo (issue4579046) Message-Id: <20110607234550.6EE10208C2@syzygy.mtv.corp.google.com> Date: Tue, 7 Jun 2011 16:45:50 -0700 (PDT) From: davidxl@google.com (David Li) X-System-Of-Record: true 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 This is trivial change to allow module id to be displayed in LIPO mode in function header. 2011-06-07 David Li * tree-pretty-print.c (revision 174779) (dump_function_header): dump module id. --- This patch is available for review at http://codereview.appspot.com/4579046 Index: tree-pretty-print.c =================================================================== --- tree-pretty-print.c (revision 174779) +++ tree-pretty-print.c (working copy) @@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. #include "tree-pass.h" #include "value-prof.h" #include "predict.h" +#include "l-ipo.h" /* Local functions, macros and variables. */ static const char *op_symbol (const_tree); @@ -3034,8 +3035,13 @@ dump_function_header (FILE *dump_file, t else aname = ""; - fprintf (dump_file, "\n;; Function %s (%s, funcdef_no=%d", - dname, aname, fun->funcdef_no); + if (L_IPO_COMP_MODE) + fprintf (dump_file, "\n;; Function %s (%s, funcdef_no=%d:%d", + dname, aname, FUNC_DECL_MODULE_ID (fun), + FUNC_DECL_FUNC_ID (fun)); + else + fprintf (dump_file, "\n;; Function %s (%s, funcdef_no=%d", + dname, aname, fun->funcdef_no); if (!(flags & TDF_NOUID)) fprintf (dump_file, ", decl_uid=%d", DECL_UID (fdecl)); if (node) Index: Makefile.in =================================================================== --- Makefile.in (revision 174779) +++ Makefile.in (working copy) @@ -2787,7 +2787,7 @@ tree-nomudflap.o : $(CONFIG_H) $(SYSTEM_ tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h tree-iterator.h $(SCEV_H) langhooks.h \ - $(TREE_PASS_H) value-prof.h output.h tree-pretty-print.h + $(TREE_PASS_H) value-prof.h output.h tree-pretty-print.h l-ipo.h tree-diagnostic.o : tree-diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TREE_H) $(DIAGNOSTIC_H) tree-diagnostic.h langhooks.h $(LANGHOOKS_DEF_H) fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \