https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125944
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-06-23
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
bit-ccp does optimistic iteration of the SSA graph, so I expect that to catch
more. But whether that's relevant is unknown.
CCP also does limited copyprop, copyprop way of tracking copy_of chains seems
to have notably different behavior for copies (copyprop also copy propagates
constants ...). Both CCP and copyprop work with the SSA propagator. The
SSA propagator can fold all or only stmts propagated into (we've added that
for VRP), not sure whether CCP/copyprop fold all or modified stmts. CCP
works "more" optimistic than copyprop (if you make copyprop optimistic
you get uninit regressions _and_ somehow the copy_of lattice breaks down IIRC).
forwprop does RPO with a classical lattice and propagates copies and constants
(and folds all stmts, not only those propagated into).
FRE does RPO with a classical lattice and propagates copies and constants
(and does VN, of course), it only folds stmts that it propagates into.
DOM walks the dominator tree with a classical lattice and propagates copies
and constants and folds stmts that are modified.
I don't remember SCCOPY exactly, but it works on the SSA graph (but doesn't
use the SSA propagator).
IMO copyprop is the most obvious pass to remove. If SCCOPY can stand-in
for it, great. Otherwise CCP w/o bit prop might be a candidate, or
forwprop with a mode that only folds modified stmts. copyprop is very
cheap, the stand-ins might not be so. Evaluating what CCP (w/o bit)/copyprop
get that forwprop does not would be interesting (optimistic handling of
unexecuted edges is done by forwprop as well).