diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2005-07-05 15:31:17 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2005-07-05 15:31:17 +0000 |
commit | 47bcb538b497203e13bcf965302e5af682f2bf12 (patch) | |
tree | 88871fd1f2075db99ebe543b01fa76b3fb6dc63c /gcc/tree-ssa-structalias.c | |
parent | cdc9bfe6aad8daf8b31b99d138ea91184b0a03ab (diff) | |
download | gcc-47bcb538b497203e13bcf965302e5af682f2bf12.zip gcc-47bcb538b497203e13bcf965302e5af682f2bf12.tar.gz gcc-47bcb538b497203e13bcf965302e5af682f2bf12.tar.bz2 |
tree-ssa-structalias.c (get_constraint_exp_from_ssa_var): Only fall back to saying it points to readonly memory if we can't do better.
2005-07-04 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-structalias.c (get_constraint_exp_from_ssa_var):
Only fall back to saying it points to readonly memory if
we can't do better.
From-SVN: r101625
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index f48bcb2..96071d6 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -1849,13 +1849,14 @@ get_constraint_exp_from_ssa_var (tree t) cexpr.type = SCALAR; - if (TREE_READONLY (t)) + cexpr.var = get_id_for_tree (t); + /* If we determine the result is "anything", and we know this is readonly, + say it points to readonly memory instead. */ + if (cexpr.var == anything_id && TREE_READONLY (t)) { cexpr.type = ADDRESSOF; cexpr.var = readonly_id; } - else - cexpr.var = get_id_for_tree (t); cexpr.offset = 0; return cexpr; |