]> git.ipfire.org Git - thirdparty/gcc.git/commit
Speed up LC SSA rewrite
authorRichard Biener <rguenther@suse.de>
Thu, 7 Jul 2022 07:00:00 +0000 (09:00 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 7 Jul 2022 07:06:13 +0000 (09:06 +0200)
commite5a9d60317852a7323e46109fa366e630b8b5bae
treebe18a160d656f860885d8e9219c8b1a357f532df
parent7922f5ee649a88cd7c0b6d1a242588013d96223d
Speed up LC SSA rewrite

The following avoids collecting all loops exit blocks into bitmaps
and computing the union of those up the loop tree possibly repeatedly.
Instead we make sure to do this only once for each loop with a
definition possibly requiring a LC phi node plus make sure to
leverage recorded exits to avoid the intermediate bitmap allocation.

* tree-ssa-loop-manip.cc (compute_live_loop_exits): Take
the def loop exit block bitmap as argument instead of
re-computing it here.
(add_exit_phis_var): Adjust.
(loop_name_cmp): New function.
(add_exit_phis): Sort variables to insert LC PHI nodes
after definition loop, for each definition loop compute
the exit block bitmap once.
(get_loops_exit): Remove.
(rewrite_into_loop_closed_ssa_1): Do not pre-record
all loop exit blocks into bitmaps.  Record loop exits
if required.
gcc/tree-ssa-loop-manip.cc