diff options
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 8f8fbfa04b9..7b702f00765 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1804,8 +1804,17 @@ may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set, alias_stats.simple_resolved++; return false; } - - /* If -fargument-noalias-global is >1, pointer arguments may + + /* If -fargument-noalias-global is > 2, pointer arguments may + not point to anything else. */ + if (flag_argument_noalias > 2 && TREE_CODE (ptr) == PARM_DECL) + { + alias_stats.alias_noalias++; + alias_stats.simple_resolved++; + return false; + } + + /* If -fargument-noalias-global is > 1, pointer arguments may not point to global variables. */ if (flag_argument_noalias > 1 && is_global_var (var) && TREE_CODE (ptr) == PARM_DECL) |