aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorFilip Kastl <fkastl@suse.cz>2023-12-14 11:29:31 +0100
committerFilip Kastl <fkastl@suse.cz>2023-12-14 11:30:40 +0100
commitcd794c3961017703a4d2ca0e854ea23b3d4b6373 (patch)
tree1547f11b5209f3a016e07850da490f2bc1b79150 /contrib
parent96e1978b213482fc4c25693b91ae2ead481af620 (diff)
downloadgcc-cd794c3961017703a4d2ca0e854ea23b3d4b6373.zip
gcc-cd794c3961017703a4d2ca0e854ea23b3d4b6373.tar.gz
gcc-cd794c3961017703a4d2ca0e854ea23b3d4b6373.tar.bz2
A new copy propagation and PHI elimination pass
This patch adds the strongly-connected copy propagation (SCCOPY) pass. It is a lightweight GIMPLE copy propagation pass that also removes some redundant PHI statements. It handles degenerate PHIs, e.g.: _5 = PHI <_1>; _6 = PHI <_6, _6, _1, _1>; _7 = PHI <16, _7>; // Replaces occurences of _5 and _6 by _1 and _7 by 16 It also handles more complicated situations, e.g.: _8 = PHI <_9, _10>; _9 = PHI <_8, _10>; _10 = PHI <_8, _9, _1>; // Replaces occurences of _8, _9 and _10 by _1 gcc/ChangeLog: * Makefile.in: Added sccopy pass. * passes.def: Added sccopy pass before LTO streaming and before RTL expansion. * tree-pass.h (make_pass_sccopy): Added sccopy pass. * gimple-ssa-sccopy.cc: New file. gcc/testsuite/ChangeLog: * gcc.dg/sccopy-1.c: New test. Signed-off-by: Filip Kastl <fkastl@suse.cz>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions