+ TODO_remove_functions /* todo_flags_finish */
+ }
+};
+
+static unsigned int
+execute_early_local_optimizations (void)
+{
+ /* First time we start with early optimization we need to advance
+ cgraph state so newly inserted functions are also early optimized.
+ However we execute early local optimizations for lately inserted
+ functions, in that case don't reset cgraph state back to IPA_SSA. */
+ if (cgraph_state < CGRAPH_STATE_IPA_SSA)
+ cgraph_state = CGRAPH_STATE_IPA_SSA;
+ return 0;
+}
+
+/* Gate: execute, or not, all of the non-trivial optimizations. */
+
+static bool
+gate_all_early_optimizations (void)
+{
+ return (optimize >= 1
+ /* Don't bother doing anything if the program has errors. */
+ && !(errorcount || sorrycount));
+}
+
+struct gimple_opt_pass pass_all_early_optimizations =
+{
+ {
+ GIMPLE_PASS,
+ "early_optimizations", /* name */
+ gate_all_early_optimizations, /* gate */
+ execute_early_local_optimizations, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_NONE, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0 /* todo_flags_finish */
+ }