diff options
author | Richard Guenther <rguenther@suse.de> | 2011-04-14 12:19:28 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-04-14 12:19:28 +0000 |
commit | ab4472fa10153d18b16704086d28599adae30e28 (patch) | |
tree | 37469c49ec7265d49916385efd0f288cc4709c98 /gcc/tree-ssa-dce.c | |
parent | 32dabdaff895ad60c48e5ebc2e8becedc0fd17d4 (diff) | |
download | gcc-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-dce.c')
-rw-r--r-- | gcc/tree-ssa-dce.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index c46836da..6dc8a57 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -824,7 +824,10 @@ propagate_necessity (struct edge_list *el) && DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL && (DECL_FUNCTION_CODE (callee) == BUILT_IN_MEMSET || DECL_FUNCTION_CODE (callee) == BUILT_IN_MALLOC - || DECL_FUNCTION_CODE (callee) == BUILT_IN_FREE)) + || DECL_FUNCTION_CODE (callee) == BUILT_IN_FREE + || DECL_FUNCTION_CODE (callee) == BUILT_IN_ALLOCA + || DECL_FUNCTION_CODE (callee) == BUILT_IN_STACK_SAVE + || DECL_FUNCTION_CODE (callee) == BUILT_IN_STACK_RESTORE)) continue; /* Calls implicitly load from memory, their arguments |