From: Richard Biener Date: Mon, 26 Aug 2019 09:29:07 +0000 (+0000) Subject: re PR c/91526 (Unnecessary SSE and other instructions generated when compiling in... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf05a3bbb58b355899ccabe861a06e85b7abe6e4;p=gcc.git re PR c/91526 (Unnecessary SSE and other instructions generated when compiling in C mode (vs. C++ mode)) 2019-08-26 Richard Biener 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7519204782..705c993bc15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-08-26 Richard Biener + + 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 * config/i386/gmm_malloc.h: Only use and errno if diff --git a/gcc/passes.def b/gcc/passes.def index 1a7fd144f87..fe5a411504d 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -313,6 +313,8 @@ along with GCC; see the file COPYING3. If not see 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); diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 76cad432ea4..336a7c72c48 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -7312,6 +7312,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; }