From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16890 invoked by alias); 17 Nov 2014 18:38:32 -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 16876 invoked by uid 89); 17 Nov 2014 18:38:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham 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; Mon, 17 Nov 2014 18:38:29 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id E07BA541611; Mon, 17 Nov 2014 19:38:24 +0100 (CET) Date: Mon, 17 Nov 2014 19:04:00 -0000 From: Jan Hubicka To: gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: Stream out default optimization nodes Message-ID: <20141117183824.GA5137@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-11/txt/msg02137.txt.bz2 Hi, this patch makes us to store default optimization node same way as we stream target node. This means that command line options given at compile time prevail those given at linktime. Previously we sort of combined both. We still have a lot of flags that are global (i.e. not marked as Optimization) but affect way how the unit is output. Since I woul dlike to replace the old option merging, I would like to add "Global" attribute to each of them in .opt file and generate streaming code for them same way as we do for optimization/target nodes. This patch regtested/bootstrapped x86_64-linux and in ealrier tree also ppc64-linux/ppc64-aix that do not work for me at the moment. I alosuse it in my tree for some time and tested firefox/libreoffice builds OK? Honza * tree.c (free_lang_data_in_decl): Store default optimization node. Index: tree.c =================================================================== --- tree.c (revision 217659) +++ tree.c (working copy) @@ -5118,6 +5118,9 @@ free_lang_data_in_decl (tree decl) if (!DECL_FUNCTION_SPECIFIC_TARGET (decl)) DECL_FUNCTION_SPECIFIC_TARGET (decl) = target_option_default_node; + if (!DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl)) + DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl) + = optimization_default_node; } /* DECL_SAVED_TREE holds the GENERIC representation for DECL.