]> git.ipfire.org Git - thirdparty/gcc.git/commit
object-size: Use simple_dce_from_worklist in object-size pass
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 3 Sep 2024 19:48:46 +0000 (12:48 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 4 Sep 2024 14:32:47 +0000 (07:32 -0700)
commit97e011a472e16ddab67d7374ee9c3db040b62798
tree9607adb6e788974ca9b819bd004d11223b0daf8b
parent284feaa809294995d6c133b8d002850a069c1ded
object-size: Use simple_dce_from_worklist in object-size pass

While trying to see if there was a way to improve object-size pass
to use the ranger (for pointer plus), I noticed that it leaves around
the statement containing __builtin_object_size if it was reduced to a constant.
This fixes that by using simple_dce_from_worklist.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-object-size.cc (object_sizes_execute): Mark lhs for maybe dceing
if doing a propagate. Call simple_dce_from_worklist.

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