This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Call update_stmt in verify_ssa


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.

this does not seem like a good way to me.  This would need changes
wherever verify_ssa is used.  Perhaps verify_ssa should instead check
that all the operands are up-to-date?

Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]