From patchwork Thu Dec 18 19:56:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 422651 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 D0C5B140082 for ; Fri, 19 Dec 2014 06:56:46 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=Vb0iCWt2B9xHopJMmacXVW8l7Mf/zUiCGYxV9ZuEn6Ytk/ KdoMw1vPIcfm4dXiO+dst0nhGNP6Hjd+zIpMB6JJe28Qh1AEZrNiR/wDXThG0uez XSYk8bYoc0l1CIoObkwmdStvFYEncLsnq6TDw+nkVvz+Q8XXIjoK3rBHKOU98= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=M55S6VHPm6ol7O/VonfDabSP0PA=; b=yIqvd6zxqhh+loLri618 ZyOoV8NOnsMD3EX55j5VuDEBQ/mBhSfk2upcc8BwNVm2LbcZ6he8BvVQms0kPSUE 5ttlz4er7t6D/MTmTXF5NrNgbRwCnXoKDxdjJGNSnQGCrd6hOod0yngjxaf4pGEa CHy3m7FuLxmSmEPz+EPrYxo= Received: (qmail 6981 invoked by alias); 18 Dec 2014 19:56:39 -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 6969 invoked by uid 89); 18 Dec 2014 19:56:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD 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; Thu, 18 Dec 2014 19:56:37 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBIJuYxG003491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 18 Dec 2014 14:56:35 -0500 Received: from reynosa.quesejoda.com (vpn-63-160.rdu2.redhat.com [10.10.63.160]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBIJuXTj002252; Thu, 18 Dec 2014 14:56:34 -0500 Message-ID: <54933171.9010304@redhat.com> Date: Thu, 18 Dec 2014 11:56:33 -0800 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: jason merrill , gcc-patches Subject: [debug-early] C++: moving more things before the compilation proper Hi Jason. As promised, I am moving most everything out of cxx_post_compilation_parsing_cleanups() which is the hook that will be called after the compilation proper has run (symtab->finalize_compilation_unit()). Apart from the Java hidden alias support which I just asked you about, and the VTV stuff which will remain in the aforementioned hook, the only remaining bits are: input_location = locus_at_end_of_parsing; #ifdef ENABLE_CHECKING validate_conversion_obstack (); #endif /* ENABLE_CHECKING */ I am keeping the input_location bit because the final VTV stuff has some error() calls which presumably will need a location. And I am keeping validate_conversion_obstack() because I *think* the VTV stuff will create calls? If not, let me know and I can move this bit too. In any case, things are pretty deserted in cxx_post_compilation_parsing_cleanups(), which should make everybody happy :-). I am committing the following to the branch. Let me know if you have any suggestions. Thanks. Aldy commit 0cf41add70fad5defc4ff07b76f95e3aaadc1b05 Author: Aldy Hernandez Date: Thu Dec 18 11:47:19 2014 -0800 * cp/decl2.c (cxx_post_compilation_parsing_cleanups): Move some final checks... (c_parse_final_cleanups): ...here. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index f9d1028..6441ab2 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4723,6 +4723,21 @@ c_parse_final_cleanups (void) pending_statics->length (), EMIT_DEBUG_EARLY); } + + perform_deferred_noexcept_checks (); + + finish_repo (); + + /* The entire file is now complete. If requested, dump everything + to a file. */ + dump_tu (); + + if (flag_detailed_statistics) + { + dump_tree_statistics (); + dump_time_statistics (); + } + timevar_stop (TV_PHASE_DBGINFO); timevar_start (TV_PHASE_PARSING); } @@ -4746,8 +4761,6 @@ cxx_post_compilation_parsing_cleanups (void) vtv_generate_init_routine (); } - perform_deferred_noexcept_checks (); - /* Generate hidden aliases for Java. */ if (java_hidden_aliases) { @@ -4755,17 +4768,6 @@ cxx_post_compilation_parsing_cleanups (void) delete java_hidden_aliases; } - finish_repo (); - - /* The entire file is now complete. If requested, dump everything - to a file. */ - dump_tu (); - - if (flag_detailed_statistics) - { - dump_tree_statistics (); - dump_time_statistics (); - } input_location = locus_at_end_of_parsing; #ifdef ENABLE_CHECKING