]> git.ipfire.org Git - thirdparty/gcc.git/commit
PHIOPT: Improve replace_phi_edge_with_variable's dce_ssa_names slightly
authorAndrew Pinski <apinski@marvell.com>
Wed, 3 May 2023 03:21:12 +0000 (20:21 -0700)
committerAndrew Pinski <apinski@marvell.com>
Thu, 4 May 2023 11:23:22 +0000 (04:23 -0700)
commit8830e46777407a7d5cd3de353394ffc46f2c785c
treeccfff6c5f05db42f4d5b9847caf273b4be6ffcc6
parent508f082829af680ec4c1a5bcf55fe464986e3c95
PHIOPT: Improve replace_phi_edge_with_variable's dce_ssa_names slightly

When I added the dce_ssa_names argument, I didn't realize bitmap was a
pointer so I used the default argument value as auto_bitmap(). But
instead we could just use nullptr and check if it was a nullptr
before calling simple_dce_from_worklist.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

* tree-ssa-phiopt.cc (replace_phi_edge_with_variable): Change
the default argument value for dce_ssa_names to nullptr.
Check to make sure dce_ssa_names is a non-nullptr before
calling simple_dce_from_worklist.
gcc/tree-ssa-phiopt.cc