Lines Matching refs:ref2
1017 /* MATCH1 and MATCH2 which are part of access path of REF1 and REF2
1030 tree match2, tree ref2,
1050 int cmp = nonoverlapping_refs_since_match_p (match1, ref1, match2, ref2,
1053 || (cmp == -1 && nonoverlapping_component_refs_p (ref1, ref2)))
1079 Walk access path REF2 and try to find type matching TYPE1
1087 in access patch REF2 and -1 if we are not sure. */
1093 tree ref2, tree base2,
1097 tree ref = ref2;
1151 ref, ref2,
1158 /* Consider access path1 base1....ref1 and access path2 base2...ref2.
1160 base1...ref1...base2...ref2.
1203 /* Determine if the two component references REF1 and REF2 which are
1214 tree ref2,
1284 base2 = ref2;
1294 ref2 = TREE_OPERAND (base2, 0);
1305 /* Now search for the type1 in the access path of ref2. This
1321 ref2, base2, offset2, max_size2,
1332 int res = aliasing_component_refs_walk (ref2, type2, base2,
1347 if (!nonoverlapping_component_refs_p (ref1, ref2))
1360 || access_path_may_continue_p (TREE_TYPE (ref2), end_struct_past_end2,
1480 /* REF1 and REF2 are ARRAY_REFs with either same base address or which are
1489 nonoverlapping_array_refs_p (tree ref1, tree ref2)
1492 tree index2 = TREE_OPERAND (ref2, 1);
1494 tree low_bound2 = cheap_array_ref_low_bound (ref2);
1508 if ((TREE_OPERAND (ref1, 3) == NULL) != (TREE_OPERAND (ref2, 3) == NULL))
1512 tree elmt_type2 = TREE_TYPE (TREE_TYPE (TREE_OPERAND (ref2, 0)));
1518 TREE_OPERAND (ref2, 3), 0))
1546 /* Try to disambiguate REF1 and REF2 under the assumption that MATCH1 and
1548 MATCH1 and MATCH2 are assumed to be ref in the access path of REF1 and REF2
1557 Return 1 if we can determine that component references REF1 and REF2,
1571 tree match2, tree ref2,
1583 || match2 == ref2 || !handled_component_p (ref2))
1602 /* Create the stack of handled components for REF2. */
1603 while (handled_component_p (ref2) && ref2 != match2)
1605 if (ends_tbaa_access_path_p (ref2))
1609 component_refs2.safe_push (ref2);
1610 ref2 = TREE_OPERAND (ref2, 0);
1620 bool mem_ref2 = TREE_CODE (ref2) == MEM_REF && ref2 != match2;
1629 || (mem_ref2 && !mem_ref1 && !integer_zerop (TREE_OPERAND (ref2, 1)))
1632 TREE_OPERAND (ref2, 1))))
1641 && TREE_CODE (ref2) != TARGET_MEM_REF);
1706 ref2 = component_refs2.pop ();
1708 if (!operand_equal_p (TREE_OPERAND (ref2, 1),
1709 cheap_array_ref_low_bound (ref2), 0))
1782 ref2 = component_refs2.pop ();
1784 if (TREE_CODE (ref2) != COMPONENT_REF)
1794 while (!RECORD_OR_UNION_TYPE_P (TREE_TYPE (TREE_OPERAND (ref2, 0))));
1799 && TREE_CODE (ref2) == COMPONENT_REF);
1802 tree field2 = TREE_OPERAND (ref2, 1);
1999 [OFFSET2, OFFSET2 + MAX_SIZE2) may alias. REF1 and REF2
2006 tree ref2, tree base2,
2027 if (ref1 && ref2
2028 && handled_component_p (ref1) && handled_component_p (ref2)
2029 && nonoverlapping_refs_since_match_p (NULL, ref1, NULL, ref2, false) == 1)
2054 in which case they are computed on-demand. REF1 and REF2
2063 tree ref2 ATTRIBUTE_UNUSED, tree base2,
2141 if (!ref2)
2146 dbase2 = ref2;
2189 if (!ref1 || !ref2
2194 int res = nonoverlapping_refs_since_match_p (base1, ref1, base2, ref2,
2197 return !nonoverlapping_component_refs_p (ref1, ref2);
2202 if (ref1 && ref2
2203 && (handled_component_p (ref1) || handled_component_p (ref2)))
2207 ref2,
2218 in which case they are computed on-demand. REF1 and REF2
2227 tree ref2 ATTRIBUTE_UNUSED, tree base2,
2277 if (ref1 && ref2)
2279 int res = nonoverlapping_refs_since_match_p (NULL, ref1, NULL, ref2,
2328 if (!ref1 || !ref2
2332 int res = nonoverlapping_refs_since_match_p (base1, ref1, base2, ref2,
2335 return !nonoverlapping_component_refs_p (ref1, ref2);
2340 if (ref1 && ref2
2341 && (handled_component_p (ref1) || handled_component_p (ref2)))
2345 ref2,
2352 /* Return true, if the two memory references REF1 and REF2 may alias. */
2355 refs_may_alias_p_2 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
2370 && (!ref2->ref
2371 || TREE_CODE (ref2->ref) == SSA_NAME
2372 || DECL_P (ref2->ref)
2373 || TREE_CODE (ref2->ref) == STRING_CST
2374 || handled_component_p (ref2->ref)
2375 || TREE_CODE (ref2->ref) == MEM_REF
2376 || TREE_CODE (ref2->ref) == TARGET_MEM_REF
2377 || TREE_CODE (ref2->ref) == WITH_SIZE_EXPR));
2383 base2 = ao_ref_base (ref2);
2384 offset2 = ref2->offset;
2385 max_size2 = ref2->max_size;
2404 && ref2->volatile_p)
2412 tree ref2ref = ref2->ref;
2426 ref2->size);
2476 std::swap (ref1, ref2);
2488 ao_ref_alias_set (ref2)))
2504 offset2, max_size2, ref2->size,
2505 ref2),
2506 ao_ref_base_alias_set (ref2),
2518 offset2, max_size2, ref2->size,
2519 ao_ref_alias_set (ref2),
2520 ao_ref_base_alias_set (ref2),
2526 /* Return true, if the two memory references REF1 and REF2 may alias
2530 refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
2532 bool res = refs_may_alias_p_2 (ref1, ref2, tbaa_p);
2541 refs_may_alias_p (tree ref1, ao_ref *ref2, bool tbaa_p)
2545 return refs_may_alias_p_1 (&r1, ref2, tbaa_p);
2549 refs_may_alias_p (tree ref1, tree ref2, bool tbaa_p)
2553 ao_ref_init (&r2, ref2);
2668 ao_ref ref2;
2669 if (access_node.get_ao_ref (stmt, &ref2))
2671 ref2.ref_alias_set = ref_node->ref;
2672 ref2.base_alias_set = base_node->base;
2673 if (refs_may_alias_p_1 (&ref2, ref, tbaa_p))
4068 /* Compare REF1 and REF2 and return flags specifying their differences.
4074 ao_compare::compare_ao_refs (ao_ref *ref1, ao_ref *ref2,
4078 if (TREE_THIS_VOLATILE (ref1->ref) != TREE_THIS_VOLATILE (ref2->ref))
4081 tree base2 = ao_ref_base (ref2);
4083 if (!known_eq (ref1->offset, ref2->offset)
4084 || !known_eq (ref1->size, ref2->size)
4085 || !known_eq (ref1->max_size, ref2->max_size))
4093 TYPE_SIZE (TREE_TYPE (ref2->ref)), 0))
4096 tree r2 = ref2->ref;
4172 tree rbase2 = ref2->ref;
4196 tree t2 = ao_ref_alias_ptr_type (ref2);
4201 t2 = ao_ref_base_alias_ptr_type (ref2);
4207 if (ao_ref_alias_set (ref1) != ao_ref_alias_set (ref2))
4209 if (ao_ref_base_alias_set (ref1) != ao_ref_base_alias_set (ref2))
4222 tree c1 = ref1->ref, c2 = ref2->ref;
4235 for (tree p2 = ref2->ref; handled_component_p (p2); p2 = TREE_OPERAND (p2, 0))