summaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-03 20:05:42 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-03 20:05:42 +0000
commit9ff256032c64eeed5baff9dfe5e0bf42dfbc3229 (patch)
tree3121c570d8493a5ae6a5f6645bb5df55a57f04dd /gcc/tree-data-ref.c
parent6759eb68d2e10fd8493a7eecd0c0e13b0f076bbb (diff)
downloadgcc-9ff256032c64eeed5baff9dfe5e0bf42dfbc3229.tar.gz
Use DR_IS_WRITE instead of !DR_IS_READ.
2010-09-03 Sebastian Pop <sebastian.pop@amd.com> * tree-data-ref.c (dr_may_alias_p): Replace !DR_IS_READ with DR_IS_WRITE. (compute_all_dependences): Same. (create_rdg_edge_for_ddr): Same. * tree-data-ref.h (DR_IS_WRITE): New. (ddr_is_anti_dependent): Replace !DR_IS_READ with DR_IS_WRITE. * tree-if-conv.c (write_memrefs_written_at_least_once): Same. (write_memrefs_written_at_least_once): Same. * tree-predcom.c (suitable_component_p): Same. (determine_roots_comp): Same. (execute_load_motion): Same. * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Same. (vect_enhance_data_refs_alignment): Same. (vect_analyze_group_access): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163841 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index ee181a69720..e1d2dfcadca 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -1335,12 +1335,12 @@ dr_may_alias_p (const struct data_reference *a, const struct data_reference *b)
return false;
/* Query the alias oracle. */
- if (!DR_IS_READ (a) && !DR_IS_READ (b))
+ if (DR_IS_WRITE (a) && DR_IS_WRITE (b))
{
if (!refs_output_dependent_p (DR_REF (a), DR_REF (b)))
return false;
}
- else if (DR_IS_READ (a) && !DR_IS_READ (b))
+ else if (DR_IS_READ (a) && DR_IS_WRITE (b))
{
if (!refs_anti_dependent_p (DR_REF (a), DR_REF (b)))
return false;
@@ -1372,7 +1372,7 @@ dr_may_alias_p (const struct data_reference *a, const struct data_reference *b)
decl_b = SSA_NAME_VAR (addr_b);
if (TYPE_RESTRICT (type_a) && TYPE_RESTRICT (type_b)
- && (!DR_IS_READ (a) || !DR_IS_READ (b))
+ && (DR_IS_WRITE (a) || DR_IS_WRITE (b))
&& decl_a && DECL_P (decl_a)
&& decl_b && DECL_P (decl_b)
&& decl_a != decl_b
@@ -4107,7 +4107,7 @@ compute_all_dependences (VEC (data_reference_p, heap) *datarefs,
FOR_EACH_VEC_ELT (data_reference_p, datarefs, i, a)
for (j = i + 1; VEC_iterate (data_reference_p, datarefs, j, b); j++)
- if (!DR_IS_READ (a) || !DR_IS_READ (b) || compute_self_and_rr)
+ if (DR_IS_WRITE (a) || DR_IS_WRITE (b) || compute_self_and_rr)
{
ddr = initialize_data_dependence_relation (a, b, loop_nest);
VEC_safe_push (ddr_p, heap, *dependence_relations, ddr);
@@ -4772,11 +4772,11 @@ create_rdg_edge_for_ddr (struct graph *rdg, ddr_p ddr)
/* Determines the type of the data dependence. */
if (DR_IS_READ (dra) && DR_IS_READ (drb))
RDGE_TYPE (e) = input_dd;
- else if (!DR_IS_READ (dra) && !DR_IS_READ (drb))
+ else if (DR_IS_WRITE (dra) && DR_IS_WRITE (drb))
RDGE_TYPE (e) = output_dd;
- else if (!DR_IS_READ (dra) && DR_IS_READ (drb))
+ else if (DR_IS_WRITE (dra) && DR_IS_READ (drb))
RDGE_TYPE (e) = flow_dd;
- else if (DR_IS_READ (dra) && !DR_IS_READ (drb))
+ else if (DR_IS_READ (dra) && DR_IS_WRITE (drb))
RDGE_TYPE (e) = anti_dd;
}