aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-06-20 12:03:16 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-06-20 12:03:16 +0000
commit825be69e343144b0608da6056d92dc5b71eb50c2 (patch)
tree184a74dea43f320ee54cbce63562ba24f77061d9 /gcc/tree-ssa-structalias.c
parent8a45323c1634094c568274d44f4780550708589c (diff)
downloadgcc-825be69e343144b0608da6056d92dc5b71eb50c2.zip
gcc-825be69e343144b0608da6056d92dc5b71eb50c2.tar.gz
gcc-825be69e343144b0608da6056d92dc5b71eb50c2.tar.bz2
tree-ssa-structalias.c (find_func_aliases): For memset use a constraint from NULL if we memset to zero.
2009-06-20 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (find_func_aliases): For memset use a constraint from NULL if we memset to zero. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Add builtins we explicitly handle that do not read from memory. (call_may_clobber_ref_p_1): Properly handle builtins that may set errno. From-SVN: r148747
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 09b8762..ac2c7dc 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3674,8 +3674,17 @@ find_func_aliases (gimple origt)
}
get_constraint_for_ptr_offset (dest, NULL_TREE, &lhsc);
do_deref (&lhsc);
- ac.type = SCALAR;
- ac.var = integer_id;
+ if (flag_delete_null_pointer_checks
+ && integer_zerop (gimple_call_arg (t, 1)))
+ {
+ ac.type = ADDRESSOF;
+ ac.var = nothing_id;
+ }
+ else
+ {
+ ac.type = SCALAR;
+ ac.var = integer_id;
+ }
ac.offset = 0;
for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); ++i)
process_constraint (new_constraint (*lhsp, ac));