summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-05-03 07:05:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-05-03 07:05:34 +0000
commitc0f9d1fd7e54434e4f06b20b9a61a9d35c578223 (patch)
tree78ef826d920777215457cdce3cb57e47c4be4d93
parenteae0da61e5dd4406a492bbe5d57238eda2e2cf0d (diff)
downloadgcc-c0f9d1fd7e54434e4f06b20b9a61a9d35c578223.tar.gz
passes.c (execute_function_todo): Remove dead code.
2019-05-03 Richard Biener <rguenther@suse.de> * passes.c (execute_function_todo): Remove dead code. From-SVN: r270832
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/passes.c24
2 files changed, 9 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 53428649c37..65df01190cc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2019-05-03 Richard Biener <rguenther@suse.de>
+
+ * passes.c (execute_function_todo): Remove dead code.
+
2019-05-02 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_dbx_register_number): Do not use
diff --git a/gcc/passes.c b/gcc/passes.c
index 02561f8bf18..a9c22889d71 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1924,26 +1924,12 @@ execute_function_todo (function *fn, void *data)
push_cfun (fn);
- /* Always cleanup the CFG before trying to update SSA. */
+ /* If we need to cleanup the CFG let it perform a needed SSA update. */
if (flags & TODO_cleanup_cfg)
- {
- cleanup_tree_cfg (flags & TODO_update_ssa_any);
-
- /* When cleanup_tree_cfg merges consecutive blocks, it may
- perform some simplistic propagation when removing single
- valued PHI nodes. This propagation may, in turn, cause the
- SSA form to become out-of-date (see PR 22037). So, even
- if the parent pass had not scheduled an SSA update, we may
- still need to do one. */
- if (!(flags & TODO_update_ssa_any) && need_ssa_update_p (cfun))
- flags |= TODO_update_ssa;
- }
-
- if (flags & TODO_update_ssa_any)
- {
- unsigned update_flags = flags & TODO_update_ssa_any;
- update_ssa (update_flags);
- }
+ cleanup_tree_cfg (flags & TODO_update_ssa_any);
+ else if (flags & TODO_update_ssa_any)
+ update_ssa (flags & TODO_update_ssa_any);
+ gcc_assert (!need_ssa_update_p (fn));
if (flag_tree_pta && (flags & TODO_rebuild_alias))
compute_may_aliases ();