This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Add RHS to V_MUST_DEF
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Andrew Macleod <amacleod at redhat dot com>
- Date: Tue, 26 Oct 2004 11:42:53 -0400
- Subject: Re: [PATCH]: Add RHS to V_MUST_DEF
- Organization: Red Hat Canada
- References: <Pine.LNX.4.60.0410260952420.21692@dberlin.org>
On Tue, 2004-10-26 at 10:29, Daniel Berlin wrote:
> @@ -1395,13 +1491,11 @@ invalidate_name_tags (bitmap vars_to_ren
> order.
>
> 3- Find and mark all the blocks that define variables
> - (mark_def_sites).
> + (mark_def_block_sites).
> ^^^^^^^^^^^^^^^^^^^^
mark_def_site_blocks
> +void
> +rewrite_def_def_chains (void)
> +{
> +
> + /* Ensure that the dominance information is OK. */
> + calculate_dominance_info (CDI_DOMINATORS);
> + mark_def_site_blocks ();
> + rewrite_blocks (false);
> + htab_delete (def_blocks);
> +
>
I'd move htab_delete (def_blocks) inside rewrite_blocks. You'll also
need to remove it from rewrite_into_ssa.
> @@ -420,6 +420,11 @@ execute_todo (int properties, unsigned i
> rewrite_into_ssa (false);
> bitmap_clear (vars_to_rename);
> }
> + if (flags & TODO_fix_def_def_chains)
> + {
> + rewrite_def_def_chains ();
> + bitmap_clear (vars_to_rename);
> + }
>
Silly optimization, but if TODO_rename_vars is also set, we don't need
to call rewrite_def_def_chains.
OK with those changes.
Diego.