]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ipa-pure-const.c (check_operand): SSA_NAME is safe.
authorJan Hubicka <jh@suse.cz>
Sat, 30 Dec 2006 12:15:16 +0000 (13:15 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 30 Dec 2006 12:15:16 +0000 (12:15 +0000)
* ipa-pure-const.c (check_operand): SSA_NAME is safe.
* ipa-type-escape.c (scan_for_refs): Look into SSA_NAMEs.

From-SVN: r120286

gcc/ChangeLog
gcc/ipa-pure-const.c
gcc/ipa-type-escape.c

index 83440dd795bb8599abf217fd9eeabdb9d166fec8..b7bae1a1cfdca4a90c01798edea42124c8dbe670 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-30  Jan Hubicka  <jh@suse.cz>
+
+       * ipa-pure-const.c (check_operand): SSA_NAME is safe.
+       * ipa-type-escape.c (scan_for_refs): Look into SSA_NAMEs.
+
 2006-12-30  Jan Hubicka  <jh@suse.cz>
 
        * tree.h (DECL_CALL_CLOBBERED): Remove.
index bd1d72b75067368ee0ba3664d05c79ae3de00f85..5f19af8c61ea3cec91e61bf79fb68a1ddfb0138f 100644 (file)
@@ -163,7 +163,8 @@ check_operand (funct_state local,
 static void
 check_tree (funct_state local, tree t, bool checking_write)
 {
-  if ((TREE_CODE (t) == EXC_PTR_EXPR) || (TREE_CODE (t) == FILTER_EXPR))
+  if ((TREE_CODE (t) == EXC_PTR_EXPR) || (TREE_CODE (t) == FILTER_EXPR)
+      || TREE_CODE (t) == SSA_NAME)
     return;
 
   /* Any tree which is volatile disqualifies thie function from being
index a7749f46a27a2038cbc83afa28f41f32b56a9c8a..7b2fac104bc7bf74d567949801521453365a2a62 100644 (file)
@@ -1267,7 +1267,11 @@ scan_for_refs (tree *tp, int *walk_subtrees, void *data)
                   result so we do mark the resulting cast as being
                   bad.  */
                if (check_call (rhs))
-                 bitmap_set_bit (results_of_malloc, DECL_UID (lhs));
+                 {
+                   if (TREE_CODE (lhs) == SSA_NAME)
+                     lhs = SSA_NAME_VAR (lhs);
+                   bitmap_set_bit (results_of_malloc, DECL_UID (lhs));
+                 }
                break;
              default:
                break;