This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Call update_stmt in verify_ssa
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, DORIT at il dot ibm dot com
- Date: Thu, 14 Apr 2005 14:15:46 -0400
- Subject: Re: [patch] Call update_stmt in verify_ssa
- References: <20050414102820.GA23232@atrey.karlin.mff.cuni.cz>
On Thu, 2005-04-14 at 06:28, Zdenek Dvorak wrote:
> Hello,
>
> this patch makes verify_ssa to call update_stmt on the statements it
> verifies. This helps to catch problems with updating of virtual
> operands, concretely the situation where the memory reference is
> modified in such a way that the virtual operands derived from it no
> longer match the recorded virtual operands.
>
> Bootstrapped & regtested on i686. At the moment, this patch causes
> basically all vectorizer tests to fail due to bug in vectorizer.
No, this is not ok.
By calling update_stmt on every stmt, you are going to cause the
verifier to miss every other bug related to immediate uses and lack of
lazy updating. Any stmt which was left out-of-date by an optimization
would now be updated by verify_ssa before we go looking for them..
Your bug is a different one. If you have changed a memory reference and
need to assert that everything has been updated in this manner, I
suggest something like calling verify_ssa at the end of your
optimization (if checking is enabled), then do this loop to update all
the stmts, and let the end-of-pass verify_ssa call ensure that
everything is ok.
Andrew