diff options
author | Richard Biener <rguenther@suse.de> | 2022-06-21 16:17:58 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-07-04 10:36:09 +0200 |
commit | d2a898666609452ef79a14feae1cadc3538e4b45 (patch) | |
tree | 38cd98b68a3bbdc0ed71b6533be8bac5a7666af2 /gcc/gimple-loop-jam.cc | |
parent | 8c6bef0a33e32e6a95dca7d50cd5be37e7262775 (diff) | |
download | gcc-d2a898666609452ef79a14feae1cadc3538e4b45.zip gcc-d2a898666609452ef79a14feae1cadc3538e4b45.tar.gz gcc-d2a898666609452ef79a14feae1cadc3538e4b45.tar.bz2 |
Put virtual operands into loop-closed SSA
When attempting to manually update SSA form after high-level loop
transforms such as loop versioning it is helpful when the loop-closed
SSA form includes virtual operands. While we have the special
rewrite_virtuals_into_loop_closed_ssa function that doesn't
presently scale, invoking update_ssa by itself. So the following
makes the regular loop-closed SSA form also cover virtual operands.
For users of loop_version this allows to use cheaper
TODO_update_ssa_no_phi, skipping dominance frontier compute
(for the whole function) and iterated dominance frontiers for each
copied def.
* tree-ssa-loop-manip.h
(rewrite_virtuals_into_loop_closed_ssa): Remove.
(rewrite_into_loop_closed_ssa_1): Likewise.
* tree-ssa-loop-manip.cc (rewrite_into_loop_closed_ssa_1):
Make static.
(rewrite_into_loop_closed_ssa): Remove loop overload,
always rewrite virtuals into LC SSA.
(check_loop_closed_ssa_bb): Also check virtuals.
* tree-ssa-dce.cc (remove_dead_phis): Preserve virtual
LC PHIs when in LC SSA.
* gimple-loop-jam.cc (fuse_loops): Do not rewrite into
loop-closed SSA here, but ...
(tree_loop_unroll_and_jam): ... here once.
* tree-if-conv.cc (version_loop_for_if_conversion): Use
the cheaper TODO_update_ssa_no_phi.
* tree-loop-distribution.cc (version_loop_by_alias_check):
Likewise.
* tree-ssa-loop-unswitch.cc (tree_unswitch_single_loop):
Likewise.
* tree-vect-loop-manip.cc (vect_loop_versioning): Likewise.
(tree_unswitch_outer_loop): Do not rewrite virtuals into
LC ssa.
* tree-parloops.cc (transform_to_exit_first_loop_alt):
Likewise.
(pass_parallelize_loops::execute): After finishing rewrite
into LC SSA again because we do not maintain it properly.
Diffstat (limited to 'gcc/gimple-loop-jam.cc')
-rw-r--r-- | gcc/gimple-loop-jam.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-loop-jam.cc b/gcc/gimple-loop-jam.cc index 9b18b52..8cde6c7 100644 --- a/gcc/gimple-loop-jam.cc +++ b/gcc/gimple-loop-jam.cc @@ -363,7 +363,6 @@ fuse_loops (class loop *loop) delete_loop (next); next = ln; } - rewrite_into_loop_closed_ssa_1 (NULL, 0, SSA_OP_USE, loop); } /* Return true if any of the access functions for dataref A @@ -610,6 +609,7 @@ tree_loop_unroll_and_jam (void) if (todo) { + rewrite_into_loop_closed_ssa (NULL, 0); scev_reset (); free_dominance_info (CDI_DOMINATORS); } |