Avoid changing PHIs in GIMPLE split_edge
authorRichard Biener <rguenther@suse.de>
Tue, 20 Oct 2020 10:52:31 +0000 (12:52 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 20 Oct 2020 12:21:01 +0000 (14:21 +0200)
commit128f43cf679e51564202b41f23fae4146347f93d
treec103baf5f960914917daca975325346a4b9751be
parent06729598b0dc10dbe60545f21c2214ad66a5a3db
Avoid changing PHIs in GIMPLE split_edge

Previously I've changed gimple_split_edge to avoid PHI node
re-allocation, but this introduced swapping of PHI arguments
due to the way edge redirection works.  This is now a problem
for me and which can be solved with the following approach
reducing the overhead of split_edge even more.  We can simply
pretend there are no PHI nodes if we can make sure the
new fallthru will have the same dest_idx as the old edge
into the destination.

2020-10-20  Richard Biener  <rguenther@suse.de>

* tree-cfg.c (reinstall_phi_args): Remove.
(gimple_split_edge): Remove PHIs around the edge redirection
to avoid touching them at all.
gcc/tree-cfg.c