]> git.ipfire.org Git - thirdparty/gcc.git/commit
Delay edge removal in forwprop
authorRichard Biener <rguenther@suse.de>
Mon, 26 Aug 2024 11:21:57 +0000 (13:21 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 26 Aug 2024 12:42:16 +0000 (14:42 +0200)
commit03b802e14f497e393e6437b7df5be1c690ddf1df
tree95a78d587b7262b5c2c41d7f81a4af75859f6143
parentd3e71b99194bff878d3bf3b35f9528a350d10df9
Delay edge removal in forwprop

SSA forwprop has switch simplification code that calls remove edge
and as side-effect releases dominator info.  For a followup we want
to retain that so the following delays removing edges until the end
of the pass.  As usual we have to deal with parts of the edge
vanishing due to EH/abnormal pruning so record edges as basic-block
index pairs and remove them only when they are still there.

* tree-ssa-forwprop.cc (simplify_gimple_switch_label_vec):
Delay removing edges and releasing dominator info, instead
record into edges_to_remove vector.
(simplify_gimple_switch): Pass through vector of to remove
edges.
(pass_forwprop::execute): Likewise.  Remove queued edges.
gcc/tree-ssa-forwprop.cc