]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not instantiate default definitions in instantiate_scev_name.
authorSebastian Pop <sebastian.pop@amd.com>
Wed, 11 Aug 2010 20:29:25 +0000 (20:29 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Wed, 11 Aug 2010 20:29:25 +0000 (20:29 +0000)
2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>

* tree-scalar-evolution.c (instantiate_scev_name): Do not
instantiate default definitions.

From-SVN: r163155

gcc/ChangeLog
gcc/ChangeLog.graphite
gcc/tree-scalar-evolution.c

index acd26fa7ffdfbf0c18ddc59996ae26a3b77618de..4b46d2631fbcc83a165668327e876757e754b546 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * tree-scalar-evolution.c (instantiate_scev_name): Do not
+       instantiate default definitions.
+
 2010-08-02  Vladimir Kargov  <kargov@gmail.com>
            Sebastian Pop  <sebastian.pop@amd.com>
 
index 699a8a635b69755849784c31c56e37d62a39c27b..155e396165680b58eab26dda276d0cf602914787 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * tree-scalar-evolution.c (instantiate_scev_name): Do not
+       instantiate default definitions.
+
 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
 
        * graphite-scop-detection.c (is_valid_stmt_p): New.
index 0e372567c8954e677e03026b93ac80b13d7dadd8..edf8b3ef658618925fe256fb9128b39d00c768ee 100644 (file)
@@ -2179,11 +2179,15 @@ instantiate_scev_name (basic_block instantiate_below,
      result again.  */
   res = analyze_scalar_evolution (def_loop, chrec);
 
-  /* Don't instantiate loop-closed-ssa phi nodes.  */
+  /* Don't instantiate default definitions.  */
   if (TREE_CODE (res) == SSA_NAME
-      && (loop_containing_stmt (SSA_NAME_DEF_STMT (res)) == NULL
-         || (loop_depth (loop_containing_stmt (SSA_NAME_DEF_STMT (res)))
-             > loop_depth (def_loop))))
+      && SSA_NAME_IS_DEFAULT_DEF (res))
+    ;
+
+  /* Don't instantiate loop-closed-ssa phi nodes.  */
+  else if (TREE_CODE (res) == SSA_NAME
+          && loop_depth (loop_containing_stmt (SSA_NAME_DEF_STMT (res)))
+          > loop_depth (def_loop))
     {
       if (res == chrec)
        res = loop_closed_phi_def (chrec);
@@ -2213,7 +2217,6 @@ instantiate_scev_name (basic_block instantiate_below,
   /* Store the correct value to the cache.  */
   set_instantiated_value (cache, instantiate_below, chrec, res);
   return res;
-
 }
 
 /* Analyze all the parameters of the chrec, between INSTANTIATE_BELOW