This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Run DCE after if conversion
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Mar 2015 10:12:15 +0100
- Subject: Re: [PATCH] Run DCE after if conversion
- Authentication-results: sourceware.org; auth=none
- References: <20150310075708 dot GA7213 at maggie>
On Tue, Mar 10, 2015 at 8:57 AM, Andreas Krebbel wrote:
>
> * gcc/ifcvt.c (if_convert):
>
...yes...?
> diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
> index a3e3e5c..d2040af 100644
> --- a/gcc/ifcvt.c
> +++ b/gcc/ifcvt.c
> @@ -4626,6 +4626,13 @@ if_convert (bool after_combine)
> num_true_changes);
> }
>
> + if (num_true_changes > 0)
> + {
> + df_set_flags (DF_LR_RUN_DCE);
> + df_mark_solutions_dirty ();
> + df_analyze ();
> + }
> +
> if (optimize == 1)
> df_remove_problem (df_live);
Tiny nail, huge hammer. This triggers a full re-scan of all insns and
a re-calculation of all dataflow problems.
The transformations in ifcvt are all simple enough that it should be
possible to just clean up that redundant insn at the site where the
code transformation is performed.
Ciao!
Steven