aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-04-14 12:19:28 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-04-14 12:19:28 +0000
commitab4472fa10153d18b16704086d28599adae30e28 (patch)
tree37469c49ec7265d49916385efd0f288cc4709c98 /gcc/tree-ssa-alias.c
parent32dabdaff895ad60c48e5ebc2e8becedc0fd17d4 (diff)
downloadgcc-ab4472fa10153d18b16704086d28599adae30e28.zip
gcc-ab4472fa10153d18b16704086d28599adae30e28.tar.gz
gcc-ab4472fa10153d18b16704086d28599adae30e28.tar.bz2
re PR middle-end/48590 (Alias analysis confused by builtin-stack-save/restore)
2011-04-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/48590 * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Handle BUILT_IN_ALLOCA, BUILT_IN_STACK_SAVE and BUILT_IN_STACK_RESTORE. (call_may_clobber_ref_p_1): Handle BUILT_IN_ALLOCA and BUILT_IN_STACK_SAVE. * tree-ssa-dce.c (propagate_necessity): Handle BUILT_IN_ALLOCA, BUILT_IN_STACK_SAVE and BUILT_IN_STACK_RESTORE. From-SVN: r172427
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 4edacb5..1e80f49 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -1196,6 +1196,9 @@ ref_maybe_used_by_call_p_1 (gimple call, ao_ref *ref)
case BUILT_IN_FREE:
case BUILT_IN_MALLOC:
case BUILT_IN_CALLOC:
+ case BUILT_IN_ALLOCA:
+ case BUILT_IN_STACK_SAVE:
+ case BUILT_IN_STACK_RESTORE:
case BUILT_IN_MEMSET:
case BUILT_IN_FREXP:
case BUILT_IN_FREXPF:
@@ -1432,6 +1435,9 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref)
&& targetm.ref_may_alias_errno (ref))
return true;
return false;
+ case BUILT_IN_STACK_SAVE:
+ case BUILT_IN_ALLOCA:
+ return false;
/* Freeing memory kills the pointed-to memory. More importantly
the call has to serve as a barrier for moving loads and stores
across it. */