===================================================================
@@ -313,6 +313,8 @@ along with GCC; see the file COPYING3.
NEXT_PASS (pass_split_paths);
NEXT_PASS (pass_tracer);
NEXT_PASS (pass_fre, false /* may_iterate */);
+ /* After late FRE we rewrite no longer addressed locals into SSA
+ form if possible. */
NEXT_PASS (pass_thread_jumps);
NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */);
NEXT_PASS (pass_strlen);
===================================================================
@@ -7312,6 +7415,11 @@ pass_fre::execute (function *fun)
if (iterate_p)
loop_optimizer_finalize ();
+ /* For late FRE after IVOPTs and unrolling, see if we can
+ remove some TREE_ADDRESSABLE and rewrite stuff into SSA. */
+ if (!may_iterate)
+ todo |= TODO_update_address_taken;
+
return todo;
}