tree-tailcall.c (find_tail_calls): If we don't have aliases computed check stmt_ann...
authorRichard Biener <rguenth@gcc.gnu.org>
Sat, 8 Sep 2007 15:09:25 +0000 (15:09 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 8 Sep 2007 15:09:25 +0000 (15:09 +0000)
2007-09-08  Richard Guenther  <rguenther@suse.de>

* tree-tailcall.c (find_tail_calls): If we don't have aliases
computed check stmt_ann->references_memory instead of counting
virtual operands.

From-SVN: r128276

gcc/ChangeLog
gcc/tree-tailcall.c

index e55536d35fdc44b2ddaa84c8228c840815f07690..ffea0a14b07e490f34150ac4a76e4d0fd13c9449 100644 (file)
@@ -1,4 +1,10 @@
-2007-09-09  Segher Boessenkool  <segher@kernel.crashing.org>
+2007-09-08  Richard Guenther  <rguenther@suse.de>
+
+       * tree-tailcall.c (find_tail_calls): If we don't have aliases
+       computed check stmt_ann->references_memory instead of counting
+       virtual operands.
+2007-09-08  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * cse.c (fold_rtx): Use validate_unshare_change() instead of
        validate_change() in one more case.
index 8651b60fc0d8f4de77cb7cf0eba16357d6a0796d..bd3da88666864ef7b101177593c71a12d20ab513 100644 (file)
@@ -414,7 +414,8 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
       /* If the statement has virtual or volatile operands, fail.  */
       ann = stmt_ann (stmt);
       if (!ZERO_SSA_OPERANDS (stmt, (SSA_OP_VUSE | SSA_OP_VIRTUAL_DEFS))
-         || ann->has_volatile_ops)
+         || ann->has_volatile_ops
+         || (!gimple_aliases_computed_p (cfun) && ann->references_memory))
        return;
     }