[tree-ssa] [PATCH]: Count number of new blocks created properly

Daniel Berlin dberlin@dberlin.org
Sat Jun 7 00:58:00 GMT 2003


The number of new blocks is new_n_basic_blocks - old_n_basic_blocks, 
not old_n_basic_blocks - new_n_basic_blocks.

Okay?

2003-06-05  Daniel Berlin  <dberlin@dberlin.org>
         * tree-cfg.c (bsi_commit_edge_inserts): Fix computation of
	   new_blocks.

Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.99
diff -u -3 -p -r1.1.4.99 tree-cfg.c
--- tree-cfg.c  4 Jun 2003 23:28:53 -0000       1.1.4.99
+++ tree-cfg.c  7 Jun 2003 00:49:19 -0000
@@ -4059,7 +4059,7 @@ bsi_commit_edge_inserts (update_annotati
      }

    if (new_blocks)
-    *new_blocks = blocks - n_basic_blocks;
+    *new_blocks = n_basic_blocks - blocks;

    /* Expand arrays if we created new blocks and need to update them.  
*/
    if (update_annotations && blocks != n_basic_blocks)



More information about the Gcc-patches mailing list