diff mbox series

dce: Remove FIXME that has not been true for years

Message ID 20241015020619.1558485-1-quic_apinski@quicinc.com
State New
Headers show
Series dce: Remove FIXME that has not been true for years | expand

Commit Message

Andrew Pinski Oct. 15, 2024, 2:06 a.m. UTC
This FIXME:
   FIXME: Aggressive mode before PRE doesn't work currently because
	  the dominance info is not invalidated after DCE1.

Has not been true since at least r0-104723-g5ac60b564faa85 which
added a call to calculate_dominance_info. Plus we run agressive mode
before PRE since r0-89162-g11b08ee9118d10 too. And since r0-95499-gb5b8b0ac643d31,
dominance information was required even for non-agressive mode.

Also we have been verifying dominance information is correct and not needing to invalidate
since ssa branch was merged so this comment has been out of date even before it was merged in.

gcc/ChangeLog:

	* tree-ssa-dce.cc (perform_tree_ssa_dce): Remove FIXME note.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
 gcc/tree-ssa-dce.cc | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Richard Biener Oct. 15, 2024, 12:50 p.m. UTC | #1
On Tue, Oct 15, 2024 at 4:07 AM Andrew Pinski <quic_apinski@quicinc.com> wrote:
>
> This FIXME:
>    FIXME: Aggressive mode before PRE doesn't work currently because
>           the dominance info is not invalidated after DCE1.
>
> Has not been true since at least r0-104723-g5ac60b564faa85 which
> added a call to calculate_dominance_info. Plus we run agressive mode
> before PRE since r0-89162-g11b08ee9118d10 too. And since r0-95499-gb5b8b0ac643d31,
> dominance information was required even for non-agressive mode.
>
> Also we have been verifying dominance information is correct and not needing to invalidate
> since ssa branch was merged so this comment has been out of date even before it was merged in.

OK.

> gcc/ChangeLog:
>
>         * tree-ssa-dce.cc (perform_tree_ssa_dce): Remove FIXME note.
>
> Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
> ---
>  gcc/tree-ssa-dce.cc | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc
> index 3075459e25f..015c17984e1 100644
> --- a/gcc/tree-ssa-dce.cc
> +++ b/gcc/tree-ssa-dce.cc
> @@ -1965,13 +1965,7 @@ make_forwarders_with_degenerate_phis (function *fn)
>     In conservative mode, we ignore control dependence and simply declare
>     all but the most trivially dead branches necessary.  This mode is fast.
>     In aggressive mode, control dependences are taken into account, which
> -   results in more dead code elimination, but at the cost of some time.
> -
> -   FIXME: Aggressive mode before PRE doesn't work currently because
> -         the dominance info is not invalidated after DCE1.  This is
> -         not an issue right now because we only run aggressive DCE
> -         as the last tree SSA pass, but keep this in mind when you
> -         start experimenting with pass ordering.  */
> +   results in more dead code elimination, but at the cost of some time.  */
>
>  static unsigned int
>  perform_tree_ssa_dce (bool aggressive)
> --
> 2.43.0
>
diff mbox series

Patch

diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc
index 3075459e25f..015c17984e1 100644
--- a/gcc/tree-ssa-dce.cc
+++ b/gcc/tree-ssa-dce.cc
@@ -1965,13 +1965,7 @@  make_forwarders_with_degenerate_phis (function *fn)
    In conservative mode, we ignore control dependence and simply declare
    all but the most trivially dead branches necessary.  This mode is fast.
    In aggressive mode, control dependences are taken into account, which
-   results in more dead code elimination, but at the cost of some time.
-
-   FIXME: Aggressive mode before PRE doesn't work currently because
-	  the dominance info is not invalidated after DCE1.  This is
-	  not an issue right now because we only run aggressive DCE
-	  as the last tree SSA pass, but keep this in mind when you
-	  start experimenting with pass ordering.  */
+   results in more dead code elimination, but at the cost of some time.  */
 
 static unsigned int
 perform_tree_ssa_dce (bool aggressive)