summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-pre.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-24 07:35:55 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-24 07:35:55 +0000
commit842c7753947bbce821b21863a7f7404c0543028b (patch)
tree57fd1e1a8691727365ec0a98226d7ba07c04e952 /gcc/tree-ssa-pre.c
parent4262c320246c6c5ce120ecbf31345720e280643d (diff)
downloadgcc-842c7753947bbce821b21863a7f7404c0543028b.tar.gz
2015-09-24 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.h (vn_reference_op_struct): Add clique and base members. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record clique and base for MEM_REF and TARGET_MEM_REF. Handle BIT_FIELD_REF offset. (ao_ref_init_from_vn_reference): Record clique and base in the built base. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise * g++.dg/tree-ssa/restrict3.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r--gcc/tree-ssa-pre.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 56bc7bf1492..ac298d3cabd 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -2531,7 +2531,10 @@ create_component_ref_by_pieces_1 (basic_block block, vn_reference_t ref,
off));
baseop = build_fold_addr_expr (base);
}
- return fold_build2 (MEM_REF, currop->type, baseop, offset);
+ genop = build2 (MEM_REF, currop->type, baseop, offset);
+ MR_DEPENDENCE_CLIQUE (genop) = currop->clique;
+ MR_DEPENDENCE_BASE (genop) = currop->base;
+ return genop;
}
case TARGET_MEM_REF:
@@ -2554,8 +2557,12 @@ create_component_ref_by_pieces_1 (basic_block block, vn_reference_t ref,
if (!genop1)
return NULL_TREE;
}
- return build5 (TARGET_MEM_REF, currop->type,
- baseop, currop->op2, genop0, currop->op1, genop1);
+ genop = build5 (TARGET_MEM_REF, currop->type,
+ baseop, currop->op2, genop0, currop->op1, genop1);
+
+ MR_DEPENDENCE_CLIQUE (genop) = currop->clique;
+ MR_DEPENDENCE_BASE (genop) = currop->base;
+ return genop;
}
case ADDR_EXPR: