This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Call update_stmt in verify_ssa
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: DORIT at il dot ibm dot com
- Date: Thu, 14 Apr 2005 12:28:20 +0200
- Subject: [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.
Zdenek
* tree-ssa.c (verify_ssa): Call update_stmt on verified statements.
Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa.c,v
retrieving revision 2.88
diff -c -3 -p -r2.88 tree-ssa.c
*** tree-ssa.c 11 Apr 2005 22:06:43 -0000 2.88
--- tree-ssa.c 14 Apr 2005 07:38:52 -0000
*************** verify_ssa (bool check_modified_stmt)
*** 639,647 ****
--- 639,656 ----
tree op;
enum dom_state orig_dom_state = dom_computed[CDI_DOMINATORS];
bitmap names_defined_in_bb = BITMAP_ALLOC (NULL);
+ block_stmt_iterator bsi;
timevar_push (TV_TREE_SSA_VERIFY);
+ /* Force statements update, to catch the case where we updated virtual
+ operands incorrectly and they do not match reality. */
+ FOR_EACH_BB (bb)
+ {
+ for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
+ update_stmt (bsi_stmt (bsi));
+ }
+
/* Keep track of SSA names present in the IL. */
for (i = 1; i < num_ssa_names; i++)
{
*************** verify_ssa (bool check_modified_stmt)
*** 671,677 ****
edge e;
tree phi;
edge_iterator ei;
- block_stmt_iterator bsi;
/* Make sure that all edges have a clear 'aux' field. */
FOR_EACH_EDGE (e, ei, bb->preds)
--- 680,685 ----