diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-28 16:14:44 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-28 16:14:44 +0000 |
commit | fb0ac37652a89ad78d1725c082bd88752bdf06a0 (patch) | |
tree | ad9578908d462a27a5795ed5dbda0412a831ec1b /gcc/tree-nrv.c | |
parent | 6e062feeb87c624559bb54ebcf278b2bb9b29c95 (diff) | |
download | gcc-fb0ac37652a89ad78d1725c082bd88752bdf06a0.tar.gz |
2007-10-28 Richard Guenther <rguenther@suse.de>
* tree-flow.h (subvar_t): Make it a VEC.
(struct subvar): Remove.
(struct var_ann_d): Use VEC(tree,gc) to store subvars.
* tree-flow-inline.h (get_subvar_at): Adjust iterators over
variable subvars.
* tree-into-ssa.c (mark_sym_for_renaming): Likewise.
* tree-nrv.c (dest_safe_for_nrv_p): Likewise.
* tree-ssa-alias.c (mark_aliases_call_clobbered): Likewise.
(set_initial_properties): Likewise.
(setup_pointers_and_addressables): Likewise.
(new_type_alias): Likewise.
(create_overlap_variables_for): Likewise.
* tree-dfa.c (dump_subvars_for): Likewise.
* tree-ssa-operands.c (add_vars_for_offset): Likewise.
(get_expr_operands): Likewise.
(add_to_addressable_set): Likewise.
* tree-ssa-structalias.c (set_uids_in_ptset): Likewise.
* gcc.dg/tree-ssa/alias-15.c: Adjust pattern.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129699 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nrv.c')
-rw-r--r-- | gcc/tree-nrv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c index 9acfb60fa22..ef5ee67a2f3 100644 --- a/gcc/tree-nrv.c +++ b/gcc/tree-nrv.c @@ -249,7 +249,9 @@ struct tree_opt_pass pass_nrv = static bool dest_safe_for_nrv_p (tree dest) { - subvar_t subvar; + subvar_t sv; + unsigned int i; + tree subvar; while (handled_component_p (dest)) dest = TREE_OPERAND (dest, 0); @@ -262,9 +264,12 @@ dest_safe_for_nrv_p (tree dest) if (is_call_clobbered (dest)) return false; - for (subvar = get_subvars_for_var (dest); subvar; subvar = subvar->next) - if (is_call_clobbered (subvar->var)) + + sv = get_subvars_for_var (dest); + for (i = 0; VEC_iterate (tree, sv, i, subvar); ++i) + if (is_call_clobbered (subvar)) return false; + return true; } |