Stream out default optimization nodes

Jan Hubicka hubicka@ucw.cz
Mon Nov 17 19:04:00 GMT 2014


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.



More information about the Gcc-patches mailing list