]> git.ipfire.org Git - thirdparty/gcc.git/commit
dce: Use a base common base class for pass_cd_dce and pass_dce
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 13 Oct 2024 18:40:39 +0000 (11:40 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Mon, 14 Oct 2024 14:35:02 +0000 (07:35 -0700)
commitddd46d481a630bc31e292927fdeb1cc5c6808257
tree498023b6c4d16bc3554310ae5cb1b4a5a4ac68bd
parent60de5585812f59a3095fa6208b01ddb8382634a0
dce: Use a base common base class for pass_cd_dce and pass_dce

The classes pass_dce and pass_cd_dce share the same mechansim for their
params and almost the same execute functionality so let's create a new
base class which will be used for these two classes and move the common
code into the same one.

Note update_address_taken_p was updated to be a NSDMI instead of initializing
it explicitly in the constructor.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-ssa-dce.cc (tree_ssa_dce): Remove.
(tree_ssa_cd_dce): Remove.
(class pass_dce_base): New class.
(class pass_dce): Use pass_dce_base as the base class.
(class pass_cd_dce): Likewise.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/tree-ssa-dce.cc