diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2005-04-11 18:25:08 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-04-11 11:25:08 -0700 |
commit | d3010d7286ad5f894ef662ea189c201f2a724290 (patch) | |
tree | 2fb8bffafb98984edbf0a9a76142caf122f481d7 /gcc/tree-ssa-alias.c | |
parent | 78a7dc9032e96f6a507d96bc7f3999ff3c9b4c42 (diff) | |
download | gcc-d3010d7286ad5f894ef662ea189c201f2a724290.zip gcc-d3010d7286ad5f894ef662ea189c201f2a724290.tar.gz gcc-d3010d7286ad5f894ef662ea189c201f2a724290.tar.bz2 |
alias-1.c: New test.
2005-04-11 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/tree-ssa/alias-1.c: New test.
2005-04-11 Andrew Pinski <pinskia@physics.uc.edu>
* tree-ssa-alias.c (may_alias_p): If the variable
is a global variable and the pointer is parameter
and -fargument-noalias-global is used, then
the pointer cannot alias the variable.
From-SVN: r97978
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index de39ed1..0f70017 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1708,6 +1708,16 @@ 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 + not point to global variables. */ + if (flag_argument_noalias > 1 && is_global_var (var) + && TREE_CODE (ptr) == PARM_DECL) + { + alias_stats.alias_noalias++; + alias_stats.simple_resolved++; + return false; + } m_ann = var_ann (mem); |