diff options
| author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-19 01:42:48 +0000 |
|---|---|---|
| committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-19 01:42:48 +0000 |
| commit | 7bbb6ff8a2c6a4b9be50769f8b7bce25ef3f75c9 (patch) | |
| tree | 1bea89da9c401e1b8e235d514d1d027b81c0eece /gcc/tree-ssa-structalias.c | |
| parent | bd4dc62d8cc4f1bbfadf82a378e78a20630c597f (diff) | |
| download | ppe42-gcc-7bbb6ff8a2c6a4b9be50769f8b7bce25ef3f75c9.tar.gz ppe42-gcc-7bbb6ff8a2c6a4b9be50769f8b7bce25ef3f75c9.zip | |
2006-01-16 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-operands.h (ssa_call_clobbered_cache_valid): Remove.
(ssa_ro_call_cache_valid): Ditto.
* tree-ssa-alias.c (sort_tags_by_id): New function.
(init_transitive_clobber_worklist): Ditto.
(add_to_worklist): Ditto.
(mark_aliases_call_clobbered): Ditto.
(compute_tag_properties): Ditto.
(set_initial_properties): Ditto.
(compute_call_clobbered): Ditto.
(compute_may_aliases): Call compute_call_clobbered and grouping.
(compute_flow_sensitive_aliasing): Remove clobbering related code.
(compute_flow_insensitive_aliasing): Grouping now happens in our
caller.
(setup_pointers_and_addressables): Remove clobbering related code.
(add_may_alias): Ditto.
(replace_may_alias): Ditto.
(get_nmt_for): Ditto.
(create_global_var):
(is_escape_site): Return an escape_type enumeration.
* tree-flow-inline.h (is_call_clobbered): Global var does not
imply call clobbered.
(mark_call_clobbered): Take a reason for marking this. Remove
marking of globalness, and cache invalidation.
(clear_call_clobbered): Remove cache invalidation code.
* tree-dfa.c (dump_variable): If details is on, dump the reason
for escaping.
* tree-outof-ssa.c (create_temp): Copy escape mask from original
variable.
* tree-flow.h (struct ptr_info_def): Add escape mask member.
(struct var_ann_d): Ditto.
(enum escape_type): New.
(mark_call_clobbered): Adjust prototype.
* tree-ssa-structalias.c (update_alias_info): Unmodifiable vars
are never call clobbered.
Record reasons for escaping.
* tree-ssa-structalias.h (is_escape_site): Update prototype.
* tree-ssa-operands.c (ssa_call_clobbered_cache_valid): Remove.
(ssa_ro_call_cache_valid): Ditto.
(clobbered_v_may_defs): Ditto.
(clobbered_vuses): Ditto.
(ro_call_vuses): Ditto.
(clobber_stats): New.
(init_ssa_operands): Zero out clobber stats.
(fini_ssa_operands): Print out clobber stats.
(get_call_expr_operands): Pass callee fndecl to
add_call_read_ops).
(add_call_clobber_ops): Remove use of cache.
Add use of PURE_CONST information.
(add_call_read_ops): Remove use of cache.
Add use of static not_read information.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109938 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
| -rw-r--r-- | gcc/tree-ssa-structalias.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 90bd037e313..923bdb77b3c 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -2953,7 +2953,7 @@ update_alias_info (tree stmt, struct alias_info *ai) bitmap addr_taken; use_operand_p use_p; ssa_op_iter iter; - bool stmt_escapes_p = is_escape_site (stmt, ai); + enum escape_type stmt_escape_type = is_escape_site (stmt, ai); tree op; /* Mark all the variables whose address are taken by the statement. */ @@ -2964,13 +2964,17 @@ update_alias_info (tree stmt, struct alias_info *ai) /* If STMT is an escape point, all the addresses taken by it are call-clobbered. */ - if (stmt_escapes_p) + if (stmt_escape_type != NO_ESCAPE) { bitmap_iterator bi; unsigned i; EXECUTE_IF_SET_IN_BITMAP (addr_taken, 0, i, bi) - mark_call_clobbered (referenced_var (i)); + { + tree rvar = referenced_var (i); + if (!unmodifiable_var_p (rvar)) + mark_call_clobbered (rvar, stmt_escape_type); + } } } @@ -3094,13 +3098,14 @@ update_alias_info (tree stmt, struct alias_info *ai) bitmap_set_bit (ai->dereferenced_ptrs_load, DECL_UID (var)); } - if (stmt_escapes_p && num_derefs < num_uses) + if (stmt_escape_type != NO_ESCAPE && num_derefs < num_uses) { /* If STMT is an escape point and STMT contains at least one direct use of OP, then the value of OP escapes and so the pointed-to variables need to be marked call-clobbered. */ pi->value_escapes_p = 1; + pi->escape_mask |= stmt_escape_type; /* If the statement makes a function call, assume that pointer OP will be dereferenced in a store |

