diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-06 15:56:20 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-06 15:56:20 +0000 |
commit | 9d17b4a85800417f8125b21a4c1c686e4017e1f6 (patch) | |
tree | fbde3337b79e868502c2f6f97441b602320dba10 /gcc/tree-ssa-alias.c | |
parent | c0b4c4012a3493c9a75f918fdd706f9b3cab66c4 (diff) | |
download | gcc-9d17b4a85800417f8125b21a4c1c686e4017e1f6.tar.gz |
2011-09-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47025
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): BUILT_IN_VA_END
uses nothing.
(call_may_clobber_ref_p_1): BUILT_IN_VA_END is a barrier like
BUILT_IN_FREE.
(stmt_kills_ref_p_1): BUILT_IN_VA_END kills what its argument
definitely points to.
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
BUILT_IN_VA_START doesn't let its va_list argument escape.
* tree-ssa-dce.c (propagate_necessity): BUILT_IN_VA_END does
not make any previous stores necessary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178601 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index bac11810c6b..10c529b114f 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1254,6 +1254,7 @@ ref_maybe_used_by_call_p_1 (gimple call, ao_ref *ref) case BUILT_IN_SINCOSF: case BUILT_IN_SINCOSL: case BUILT_IN_ASSUME_ALIGNED: + case BUILT_IN_VA_END: return false; /* __sync_* builtins and some OpenMP builtins act as threading barriers. */ @@ -1518,6 +1519,7 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref) the call has to serve as a barrier for moving loads and stores across it. */ case BUILT_IN_FREE: + case BUILT_IN_VA_END: { tree ptr = gimple_call_arg (call, 0); return ptr_deref_may_alias_ref_p_1 (ptr, ref); @@ -1763,10 +1765,23 @@ stmt_kills_ref_p_1 (gimple stmt, ao_ref *ref) / BITS_PER_UNIT))) return true; } + break; + } + + case BUILT_IN_VA_END: + { + tree ptr = gimple_call_arg (stmt, 0); + if (TREE_CODE (ptr) == ADDR_EXPR) + { + tree base = ao_ref_base (ref); + if (TREE_OPERAND (ptr, 0) == base) + return true; + } + break; } + default:; } - } return false; } |