aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-01-17 16:51:05 +0000
committerPaul Brook <paul@codesourcery.com>2006-01-17 16:51:05 +0000
commit56f078c136c134b3b415ed1dd517e58bce9485ee (patch)
tree278ced803a2a59cd020f3c297cef56a8d4239054 /gcc/tree-ssa-loop-ivopts.c
parentc570ce98de6f4910bc02fcc39bef5004ede14da1 (diff)
Merge from gcc-4_1-branch revision 109820.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@109825 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 4affcf41728..0269b2e73a9 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5490,10 +5490,18 @@ unshare_and_remove_ssa_names (tree ref)
and extracts this single useful piece of information. */
static tree
-get_ref_tag (tree ref)
+get_ref_tag (tree ref, tree orig)
{
tree var = get_base_address (ref);
- tree tag;
+ tree tag, sv;
+ unsigned HOST_WIDE_INT offset, size;
+
+ for (sv = orig; handled_component_p (sv); sv = TREE_OPERAND (sv, 0))
+ if (okay_component_ref_for_subvars (sv, &offset, &size))
+ break;
+
+ if (handled_component_p (sv))
+ return unshare_expr (sv);
if (!var)
return NULL_TREE;
@@ -5540,8 +5548,8 @@ copy_ref_info (tree new_ref, tree old_ref)
copy_mem_ref_info (new_ref, old_ref);
else
{
- TMR_TAG (new_ref) = get_ref_tag (old_ref);
TMR_ORIGINAL (new_ref) = unshare_and_remove_ssa_names (old_ref);
+ TMR_TAG (new_ref) = get_ref_tag (old_ref, TMR_ORIGINAL (new_ref));
}
}