This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Avoid ssa update in cfg cleanup
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, dberlin at dberlin dot org, Andrew Macleod <amacleod at redhat dot com>
- Date: Wed, 15 Feb 2006 10:56:58 -0500
- Subject: Re: [patch] Avoid ssa update in cfg cleanup
- References: <20060203220436.GA26619@atrey.karlin.mff.cuni.cz>
Zdenek Dvorak wrote:
> 1) V_MAY_DEF may become V_MUST_DEF after copy propagation. In this
> case, we would lose the old ssa names in update_stmt, which would force
> us to use update_ssa. The tree-ssa-operands changes ensure that
> V_MUST_DEF operands may inherit the ssa names of old V_MAY_DEF operands.
>
Hmm, I'm a bit hesitant about this change. I would like Andrew's
opinion first. I understand why it's needed and I tend to agree,
however, we do lose the static checking provided by the separate types.
Perhaps we will need to add a checking feature like we have on trees,
so that at least accessors like MUSTDEF_KILL can assert that they're
indeed operating on a V_MUST_DEF. Andrew?
> --- 358,366 ----
>
> /* If the pass has caused the SSA form to be out-of-date, update it
> now. */
> ! if (update_flag)
> ! update_ssa (update_flag);
> ! gcc_assert (!need_ssa_update_p ());
>
Need comment in function header specfiying that if UPDATE_FLAG is 0, we
won't call update_ssa.
The rest looks fine.