This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix streaming of target optimization/option nodes
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Mon, 15 Dec 2014 07:26:19 +0100
- Subject: Fix streaming of target optimization/option nodes
- Authentication-results: sourceware.org; auth=none
Hi,
the testcase in PR ipa/61324 fails because it is compiled with -O0 and linked with -O2.
This should not matter anymore if there wasn't the following problem in streamer that
makes us to merge all default nodes across units.
Bootstrapped/regtested x86_64-linux, plan to commit it after more testing finishes (Firefox)
Honza
PR ipa/61324
* tree-streamer.c (preload_common_nodes): Do not ocnsider optimizatoin
nad target_option nodes as common nodes; they depend on flags.
Index: tree-streamer.c
===================================================================
--- tree-streamer.c (revision 218726)
+++ tree-streamer.c (working copy)
@@ -324,7 +324,14 @@ preload_common_nodes (struct streamer_tr
/* Skip boolean type and constants, they are frontend dependent. */
if (i != TI_BOOLEAN_TYPE
&& i != TI_BOOLEAN_FALSE
- && i != TI_BOOLEAN_TRUE)
+ && i != TI_BOOLEAN_TRUE
+ /* Skip optimization and target option nodes; they depend on flags. */
+ && i != TI_OPTIMIZATION_DEFAULT
+ && i != TI_OPTIMIZATION_CURRENT
+ && i != TI_TARGET_OPTION_DEFAULT
+ && i != TI_TARGET_OPTION_CURRENT
+ && i != TI_CURRENT_TARGET_PRAGMA
+ && i != TI_CURRENT_OPTIMIZE_PRAGMA)
record_common_node (cache, global_trees[i]);
}