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]

[tuples][patch] Moving variable declaration to the top of the block


Hi,
Its the same problem that I had to fix in my previous patch. A
variable is declared below gcc_assert. This patch fixes it.
Oleg

2008-04-15  Oleg Ryjkov  <olegr@google.com>

        * tree-ssa-dom.c (record_const_or_copy): Moving a variable
declaration to
        the top of a block.
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 134323)
+++ tree-ssa-dom.c	(working copy)
@@ -1491,10 +1491,10 @@ loop_depth_of_name (tree x)
 static void
 record_const_or_copy (tree x, tree y)
 {
-  gcc_assert (TREE_CODE (x) == SSA_NAME);
-
   tree prev_x = SSA_NAME_VALUE (x);
 
+  gcc_assert (TREE_CODE (x) == SSA_NAME);
+
   if (TREE_CODE (y) == SSA_NAME)
     {
       tree tmp = SSA_NAME_VALUE (y);
Index: ChangeLog.tuples
===================================================================
--- ChangeLog.tuples	(revision 134323)
+++ ChangeLog.tuples	(working copy)
@@ -1,3 +1,8 @@
+2008-04-15  Oleg Ryjkov  <olegr@google.com>
+
+	* tree-ssa-dom.c (record_const_or_copy): Moving a variable declaration to
+	the top of a block.
+
 2008-04-15  Doug Kwan  <dougkwan@google.com>
 
 	* tree-ssa-sink.c (File): Uncomment all previously disabled code.

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