This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with your change to recompute virtual operands
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Sep 2003 17:07:31 -0400
- Subject: Re: Problem with your change to recompute virtual operands
- Organization: Red Hat Canada
- References: <200309162057.h8GKvZsQ010989@speedy.slc.redhat.com>
On Tue, 2003-09-16 at 16:57, law@redhat.com wrote:
> The fundamental problem is you can't recreate the SSA versions when
> you rebuild the virtual operands.
>
Actually, you can. You just need to add the affected variables to the
VARS_TO_RENAME array in optimize_block. You don't recreate the virtual
operands inside optimize_stmt, though. That messes up the hash tables
used by DOM. What we do is have optimize_block re-scan all the
statements that optimize_stmt asked us to.
> If you've got testcode, I'm happy to look at it.
>
> FWIW, here's code that blows up after your change and shows why it's
> unsafe in general to rebuild the virtual operands:
>
This actually seems like a bug in get_expr_operands() exposed by
must-alias propagation.
> # VUSE <equot>;
> *(&equot + 2B) = *T.1_6;
>
get_expr_operand() couldnt' fold this into equot[1]. I'll take a look.
Diego.