Fix flag_toplevel_reorder wrt optimize attribute
diff mbox series

Message ID
State New
Headers show
  • Fix flag_toplevel_reorder wrt optimize attribute
Related show

Commit Message

Jan Hubicka Dec. 8, 2019, 1:53 p.m. UTC
this is (very likely partial) fix for PR92860 where optimize attribute
incorrectly rewrites flag_toplevel_reorder which we handle as global
flag.  In fact we support per-symbol toplevel reordering for a while
so we only need to add the annotation. However we need to inspect all
other flags implied by optimize that they have Optimization attribute on

Also i think this should be backoported to release branches, but it
breaks LTO streaming compaibility.

Bootstrapped/regtested x86_64-linux, comitted.

	PR tree-optimization/92860
	* common.opt (fprofile-reorder-functions, ftoplevel-reorder): Add
	Optimization flag.

diff mbox series

Index: common.opt
--- common.opt	(revision 279076)
+++ common.opt	(working copy)
@@ -2181,7 +2181,7 @@  Common Report Var(profile_report)
 Report on consistency of profile.
-Common Report Var(flag_profile_reorder_functions)
+Common Report Var(flag_profile_reorder_functions) Optimization
 Enable function reordering that improves code placement.
@@ -2586,7 +2586,7 @@  EnumValue
 Enum(tls_model) String(local-exec) Value(TLS_MODEL_LOCAL_EXEC)
-Common Report Var(flag_toplevel_reorder) Init(2)
+Common Report Var(flag_toplevel_reorder) Init(2) Optimization
 Reorder top level functions, variables, and asms.