aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-operands.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2007-03-09 07:27:44 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2007-03-09 07:27:44 +0000
commit1296c31f09a6f9ec9030f4641f8a3bc50e509dc7 (patch)
treeb5a2d1dcfc824ec72c027db8dd476501c3232535 /gcc/tree-ssa-operands.c
parent84ac30cb94526de72f51abbea2a223ad8714a85e (diff)
downloadgcc-1296c31f09a6f9ec9030f4641f8a3bc50e509dc7.zip
gcc-1296c31f09a6f9ec9030f4641f8a3bc50e509dc7.tar.gz
gcc-1296c31f09a6f9ec9030f4641f8a3bc50e509dc7.tar.bz2
tree-ssa-structalias.c (variable_info): Remove finished_solution.
2007-03-09 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-structalias.c (variable_info): Remove finished_solution. (new_var_info): Ditto. (shared_bitmap_info_t): New structure. (shared_bitmap_table): New variable. (shared_bitmap_hash): New function. (shared_bitmap_eq): Ditto (shared_bitmap_lookup): Ditto. (shared_bitmap_add): Ditto. (merge_smts_into): Change to take bitmap directly. (find_what_p_points_to): Rewrite to use shared bitmap hashtable. (init_alias_vars): Init shared bitmap hashtable. (delete_points_to_sets): Delete shared bitmap hashtable. * tree-ssa-operands.c (add_virtual_operand): Partially revert the is_aliased removal as a change that was still necessary was deleted. From-SVN: r122741
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r--gcc/tree-ssa-operands.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 8e8ef64..26f4963 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1523,13 +1523,23 @@ add_virtual_operand (tree var, stmt_ann_t s_ann, int flags,
append_vdef (al);
}
- /* Even if no aliases have been added, we still need to
- establish def-use and use-def chains, lest
- transformations think that this is not a memory
- reference. For an example of this scenario, see
- testsuite/g++.dg/opt/cleanup1.C. */
- if (none_added)
- append_vdef (var);
+ /* If the variable is also an alias tag, add a virtual
+ operand for it, otherwise we will miss representing
+ references to the members of the variable's alias set.
+ This fixes the bug in gcc.c-torture/execute/20020503-1.c.
+
+ It is also necessary to add bare defs on clobbers for
+ SMT's, so that bare SMT uses caused by pruning all the
+ aliases will link up properly with calls. In order to
+ keep the number of these bare defs we add down to the
+ minimum necessary, we keep track of which SMT's were used
+ alone in statement vdefs or VUSEs. */
+ if (none_added
+ || (TREE_CODE (var) == SYMBOL_MEMORY_TAG
+ && is_call_site))
+ {
+ append_vdef (var);
+ }
}
else
{