From patchwork Thu Aug 20 11:00:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 508996 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D81CD1401F0 for ; Thu, 20 Aug 2015 21:00:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=LKVG2m3d; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=UiX+cDElAR2N2kl51pTXrUZ0z8hW1nRouo2TPU8xK+xMHfrxX7smL g6kXHnZEcseFtF0udhjYMBWO1mffVqVA84AUIMJf57Tbtbm4Ktyt0ExnlMj9ZfH5 zqvPWYLWpc54Ptc9soKA1hFHqCLw1f5sVqPsdUkhbEF5Xq1OdzHEqo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=sq2DV2rjJziuoFvuHnYqYXqMQl0=; b=LKVG2m3dPrsu40rypc+y Q8+KENaSz5sXvkF9AfSoknvmEW4/88bxVCFgFI28YowJ8NOP7dsLbvBezHhmTdmn lJqMM2VKs1aUdhM56laUnNWfkuLGzF3ddr1J1mu1WGLac7vzMCdcaPMAyeqjM7gq +mCtKFyj3XJC8Nu3fL2AQ/s= Received: (qmail 21162 invoked by alias); 20 Aug 2015 11:00:26 -0000 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 Received: (qmail 21144 invoked by uid 89); 20 Aug 2015 11:00:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_PASS autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 20 Aug 2015 11:00:25 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4D4C6AD14 for ; Thu, 20 Aug 2015 11:00:21 +0000 (UTC) Date: Thu, 20 Aug 2015 13:00:21 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Move late_global_decl call Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 This moves it where it really belongs, also avoiding extra work for the slim LTO compile phase. Bootstrapped and tested and gdb tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-08-20 Richard Biener * toplev.c (compile_file): Remove loop calling late_global_decl on all symbols. * varpool.c (varpool_node::assemble_decl): Call late_global_decl on decls we assembled. Index: gcc/toplev.c =================================================================== --- gcc/toplev.c (revision 226966) +++ gcc/toplev.c (working copy) @@ -580,15 +580,6 @@ compile_file (void) if (seen_error ()) return; - /* After the parser has generated debugging information, augment - this information with any new location/etc information that may - have become available after the compilation proper. */ - timevar_start (TV_PHASE_DBGINFO); - symtab_node *node; - FOR_EACH_DEFINED_SYMBOL (node) - debug_hooks->late_global_decl (node->decl); - timevar_stop (TV_PHASE_DBGINFO); - timevar_start (TV_PHASE_LATE_ASM); /* Compilation unit is finalized. When producing non-fat LTO object, we are Index: gcc/varpool.c =================================================================== --- gcc/varpool.c (revision 226966) +++ gcc/varpool.c (working copy) @@ -586,6 +586,12 @@ varpool_node::assemble_decl (void) gcc_assert (TREE_ASM_WRITTEN (decl)); gcc_assert (definition); assemble_aliases (); + /* After the parser has generated debugging information, augment + this information with any new location/etc information that may + have become available after the compilation proper. */ + timevar_start (TV_PHASE_DBGINFO); + debug_hooks->late_global_decl (decl); + timevar_stop (TV_PHASE_DBGINFO); return true; }