diff options
author | Richard Guenther <rguenther@suse.de> | 2010-04-07 15:31:37 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-07 15:31:37 +0000 |
commit | 2ea9dc6459761bae70146f8ea85436f70eca25eb (patch) | |
tree | 24b98f856ca6626ac198b3511f687951a4a1ec86 /gcc/ipa-reference.c | |
parent | 5fd5c97a3458128c95577bbff190795f39e4cdfb (diff) | |
download | gcc-2ea9dc6459761bae70146f8ea85436f70eca25eb.zip gcc-2ea9dc6459761bae70146f8ea85436f70eca25eb.tar.gz gcc-2ea9dc6459761bae70146f8ea85436f70eca25eb.tar.bz2 |
ipa-reference.c (mark_load): Use get_base_address.
2010-04-07 Richard Guenther <rguenther@suse.de>
* ipa-reference.c (mark_load): Use get_base_address.
(mark_store): Likewise.
* tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Avoid
inserting GIMPLE_NOPs into the IL.
* tree-ssa-structalias.c (get_constraint_for_component_ref):
Explicitly strip handled components and indirect references.
* fold-const.c (fold_unary_loc): Do not strip qualifiers when
folding address expressions.
* gimple.c (gimple_ior_addresses_taken_1): Use get_base_address.
* tree-ssa-alias.c (decl_refs_may_alias_p): Do not use
operand_equal_p to compare decls.
(ptr_deref_may_alias_decl_p): Likewise.
* tree-ssa-operands.c (get_asm_expr_operands): Simplify
* tree-ssa-forwprop.c (forward_propagate_into_gimple_cond):
Handle reversed comparison ops.
* tree-sra.c (asm_visit_addr): Use get_base_address.
* ipa-prop.c (visit_store_addr_for_mod_analysis): Use
get_base_address.
* ipa-reference.c (mark_address): Use get_base_address.
From-SVN: r158069
Diffstat (limited to 'gcc/ipa-reference.c')
-rw-r--r-- | gcc/ipa-reference.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index cc790fd..9eac3b1 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -352,9 +352,9 @@ static bool mark_address (gimple stmt ATTRIBUTE_UNUSED, tree addr, void *data ATTRIBUTE_UNUSED) { - while (handled_component_p (addr)) - addr = TREE_OPERAND (addr, 0); - mark_address_taken (addr); + addr = get_base_address (addr); + if (addr) + mark_address_taken (addr); return false; } @@ -364,7 +364,8 @@ static bool mark_load (gimple stmt ATTRIBUTE_UNUSED, tree t, void *data) { ipa_reference_local_vars_info_t local = (ipa_reference_local_vars_info_t)data; - if (TREE_CODE (t) == VAR_DECL + t = get_base_address (t); + if (t && TREE_CODE (t) == VAR_DECL && has_proper_scope_for_analysis (t)) bitmap_set_bit (local->statics_read, DECL_UID (t)); return false; @@ -376,7 +377,8 @@ static bool mark_store (gimple stmt ATTRIBUTE_UNUSED, tree t, void *data) { ipa_reference_local_vars_info_t local = (ipa_reference_local_vars_info_t)data; - if (TREE_CODE (t) == VAR_DECL + t = get_base_address (t); + if (t && TREE_CODE (t) == VAR_DECL && has_proper_scope_for_analysis (t)) { if (local) |