tree-optimization/103690 - not up-to-date SSA and PRE DCE
authorRichard Biener <rguenther@suse.de>
Tue, 4 Jan 2022 10:59:35 +0000 (11:59 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 4 Jan 2022 12:17:14 +0000 (13:17 +0100)
commitebc853deb7cc0487de9ef6e891a007ba853d1933
treeff4a9fa8eb5948ec31be0b09adfaa64f9746c5be
parentbeed3f8f60492289ca6211d86c54a2254a642035
tree-optimization/103690 - not up-to-date SSA and PRE DCE

This avoids running simple_dce_from_worklist on partially not up-to-date
SSA form (in unreachable code regions) by scheduling CFG cleanup
manually as is done anyway when tail-merging runs.

2022-01-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/103690
* tree-pass.h (tail_merge_optimize): Adjust.
* tree-ssa-tail-merge.c (tail_merge_optimize): Pass in whether
to re-split critical edges, move CFG cleanup ...
* tree-ssa-pre.c (pass_pre::execute): ... here, before
simple_dce_from_worklist and delay freeing inserted_exprs from
...
(fini_pre): .. here.
gcc/tree-pass.h
gcc/tree-ssa-pre.c
gcc/tree-ssa-tail-merge.c