]> git.ipfire.org Git - thirdparty/gcc.git/commit
gimple ssa: Put SCCOPY logic into a class
authorFilip Kastl <fkastl@suse.cz>
Tue, 6 Aug 2024 13:19:11 +0000 (15:19 +0200)
committerFilip Kastl <fkastl@suse.cz>
Tue, 6 Aug 2024 13:19:11 +0000 (15:19 +0200)
commitaf1010268f81fc891a6bbf8ed9d5b8a3b5ce44cb
tree5925a56f1b16c22cea04991465395e2840f2eec4
parent31efd46ad8a16aa671f4502816b6b1f9946027ae
gimple ssa: Put SCCOPY logic into a class

Currently the main logic of the sccopy pass is implemented as static
functions.  This patch instead puts the code into a class.  This also
gets rid of a global variable (dead_stmts).

gcc/ChangeLog:

* gimple-ssa-sccopy.cc (class scc_copy_prop): New class.
(replace_scc_by_value): Put into...
(scc_copy_prop::replace_scc_by_value): ...scc_copy_prop.
(sccopy_visit_op): Put into...
(scc_copy_prop::visit_op): ...scc_copy_prop.
(sccopy_propagate): Put into...
(scc_copy_prop::propagate): ...scc_copy_prop.
(init_sccopy): Replace by...
(scc_copy_prop::scc_copy_prop): ...the construtor.
(finalize_sccopy): Replace by...
(scc_copy_prop::~scc_copy_prop): ...the destructor.
(pass_sccopy::execute): Use scc_copy_prop.

Signed-off-by: Filip Kastl <fkastl@suse.cz>
gcc/gimple-ssa-sccopy.cc