Commit bf05a3bb by Richard Biener Committed by Richard Biener

re PR c/91526 (Unnecessary SSE and other instructions generated when compiling…

re PR c/91526 (Unnecessary SSE and other instructions generated when compiling in C mode (vs. C++ mode))

2019-08-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91526
	* passes.def: Note that after late FRE we do TODO_update_address_taken.
	* tree-ssa-sccvn.c (pass_fre::execute): In late mode schedule
	TODO_update_address_taken.

From-SVN: r274922
parent 20e7012b
2019-08-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/91526
* passes.def: Note that after late FRE we do TODO_update_address_taken.
* tree-ssa-sccvn.c (pass_fre::execute): In late mode schedule
TODO_update_address_taken.
2019-08-26 Gerald Pfeifer <gerald@pfeifer.com> 2019-08-26 Gerald Pfeifer <gerald@pfeifer.com>
* config/i386/gmm_malloc.h: Only use <errno.h> and errno if * config/i386/gmm_malloc.h: Only use <errno.h> and errno if
......
...@@ -313,6 +313,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -313,6 +313,8 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_split_paths); NEXT_PASS (pass_split_paths);
NEXT_PASS (pass_tracer); NEXT_PASS (pass_tracer);
NEXT_PASS (pass_fre, false /* may_iterate */); 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_thread_jumps);
NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */); NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */);
NEXT_PASS (pass_strlen); NEXT_PASS (pass_strlen);
......
...@@ -7312,6 +7312,11 @@ pass_fre::execute (function *fun) ...@@ -7312,6 +7312,11 @@ pass_fre::execute (function *fun)
if (iterate_p) if (iterate_p)
loop_optimizer_finalize (); 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; return todo;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment