summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-08 06:34:23 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-08 06:34:23 +0000
commitdf62eec83cf244dcfc47d56ef05e658b201b4163 (patch)
tree5c79cb7b4b5618ddb85532e6e8073409ae3d4f11 /gcc/tree-ssa-alias.c
parente51fd8a5332b5d8958b87a04230a2a6a7406e1ce (diff)
downloadgcc-df62eec83cf244dcfc47d56ef05e658b201b4163.tar.gz
* tree-flow.h (addressable_vars): Declare.
* tree-ssa-alias.c (addressable_vars): Define. (setup_pointers_and_addressables): Add addressable variables to addressable_vars. * tree-ssa-operands.c (get_stmt_operands): Move handling of ASM_EXPRs ... (get_asm_expr_operands): ... here. When the ASM_EXPR clobbers memory, also clobber addressable variables. * tree-ssa.c (init_tree_ssa): Initialize addressable_vars. (delete_tree_ssa): Reset addressable_vars. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84272 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 75c98e12d3d..3cf27ae6a6b 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -163,6 +163,10 @@ static struct ptr_info_def *get_ptr_info (tree t);
REFERENCED_VARS (I) is call-clobbered. */
bitmap call_clobbered_vars;
+/* Addressable variables in the function. If bit I is set, then
+ REFERENCED_VARS (I) has had its address taken. */
+bitmap addressable_vars;
+
/* 'true' after aliases have been computed (see compute_may_aliases). This
is used by get_stmt_operands and its helpers to determine what to do
when scanning an operand for a variable that may be aliased. If
@@ -1196,6 +1200,14 @@ setup_pointers_and_addressables (struct alias_info *ai)
to rename VAR into SSA afterwards. */
bitmap_set_bit (vars_to_rename, v_ann->uid);
}
+ else
+ {
+ /* Add the variable to the set of addressables. Mostly
+ used when scanning operands for ASM_EXPRs that
+ clobber memory. In those cases, we need to clobber
+ all call-clobbered variables and all addressables. */
+ bitmap_set_bit (addressable_vars, v_ann->uid);
+ }
}
/* Global variables and addressable locals may be aliased. Create an