Lines Matching refs:access
41 candidate bitmap. More importantly, for every access into an aggregate,
42 an access structure (struct access) is created by create_access() and
44 information, the aggregate declaration, the offset and size of the access
54 an access disqualifies the whole aggregate from being scalarized.
56 If there is no such inhibiting overlap, a representative access structure
59 of an access are within their parent (in terms of offset and size).
62 does not create a partially overlapping access) across assign_links from
115 /* ACCESS represents each access to an aggregate variable (as a whole or a
125 to offset+size of the root. Children of an access are sorted by offset.
128 represented by an access to the whole complex number or a vector. It is a
131 struct access
141 expressions to access the original aggregate. See PR 42154 for a
147 /* The statement this access belongs to. */
151 struct access *next_grp;
155 struct access *group_representative;
157 /* After access tree has been constructed, this points to the parent of the
158 current access, if there is one. NULL for roots. */
159 struct access *parent;
161 /* If this access has any children (in terms of the definition above), this
163 struct access *first_child;
165 /* In intraprocedural SRA, pointer to the next sibling in the access tree as
167 struct access *next_sibling;
177 /* Pointer to the next access in the work queues. */
178 struct access *next_rhs_queued, *next_lhs_queued;
180 /* Replacement variable for this access "region." Never to be accessed
185 /* Is this access made in reverse storage order? */
188 /* Is this particular access write access? */
191 /* Is this access currently in the rhs work queue? */
194 /* Is this access currently in the lhs work queue? */
197 /* Does this group contain a write access? This flag is propagated down the
198 access tree. */
201 /* Does this group contain a read access? This flag is propagated down the
202 access tree. */
205 /* Does this group contain a read access that comes from an assignment
206 statement? This flag is propagated down the access tree. */
209 /* Does this group contain a write access that comes from an assignment
210 statement? This flag is propagated down the access tree. */
213 /* Does this group contain a read access through a scalar type? This flag is
214 not propagated in the access tree in any direction. */
217 /* Does this group contain a write access through a scalar type? This flag
218 is not propagated in the access tree in any direction. */
221 /* In a root of an access tree, true means that the entire tree should be
233 /* Is the subtree rooted in this access fully covered by scalar
237 /* If set to true, this access and all below it in an access tree must not be
242 access which is not to be scalarized. This flag is propagated up in the
243 access tree. */
250 /* Does this access and/or group contain a write access through a
268 typedef struct access *access_p;
271 /* Alloc pool for allocating access structures. */
272 static object_allocator<struct access> access_pool ("SRA accesses");
277 we also propagate grp_write flag to lazily mark that the access contains any
281 struct access *lacc, *racc;
345 static struct access *rhs_work_queue_head, *lhs_work_queue_head;
347 /* Dump contents of ACCESS to file F in a human friendly way. If GRP is true,
349 individual access are. */
400 dump_access (FILE *f, struct access *access, bool grp)
402 fprintf (f, "access { ");
403 fprintf (f, "base = (%d)'", DECL_UID (access->base));
404 print_generic_expr (f, access->base);
405 fprintf (f, "', offset = " HOST_WIDE_INT_PRINT_DEC, access->offset);
406 fprintf (f, ", size = " HOST_WIDE_INT_PRINT_DEC, access->size);
408 print_generic_expr (f, access->expr);
410 print_generic_expr (f, access->type);
411 fprintf (f, ", reverse = %d", access->reverse);
420 access->grp_read, access->grp_write, access->grp_assignment_read,
421 access->grp_assignment_write, access->grp_scalar_read,
422 access->grp_scalar_write, access->grp_total_scalarization,
423 access->grp_hint, access->grp_covered,
424 access->grp_unscalarizable_region, access->grp_unscalarized_data,
425 access->grp_same_access_path, access->grp_partial_lhs,
426 access->grp_to_be_replaced, access->grp_to_be_debug_replaced);
430 access->write, access
431 access->grp_partial_lhs);
434 /* Dump a subtree rooted in ACCESS to file F, indent by LEVEL. */
437 dump_access_tree_1 (FILE *f, struct access *access, int level)
446 dump_access (f, access, true);
448 if (access->first_child)
449 dump_access_tree_1 (f, access->first_child, level + 1);
451 access = access->next_sibling;
453 while (access);
456 /* Dump all access trees for a variable, given the pointer to the first root in
457 ACCESS. */
460 dump_access_tree (FILE *f, struct access *access)
462 for (; access; access = access->next_grp)
463 dump_access_tree_1 (f, access, 0);
469 access_has_children_p (struct access *acc)
477 access_has_replacements_p (struct access *acc)
479 struct access *child;
497 /* Find an access with required OFFSET and SIZE in a subtree of accesses rooted
498 in ACCESS. Return NULL if it cannot be found. */
500 static struct access *
501 find_access_in_subtree (struct access *access, HOST_WIDE_INT offset,
504 while (access && (access->offset != offset || access->size != size))
506 struct access *child = access->first_child;
510 access = child;
514 single field but rather creates an access for them underneath. Look for
516 if (access)
517 while (access->first_child
518 && access->first_child->offset == offset
519 && access->first_child->size == size)
520 access = access->first_child;
522 return access;
527 static struct access *
539 /* Find an access representative for the variable BASE and given OFFSET and
540 SIZE. Requires that access trees have already been built. Return NULL if
543 static struct access *
547 struct access *access;
549 access = get_first_repr_for_decl (base);
550 while (access && (access->offset + access->size <= offset))
551 access = access->next_grp;
552 if (!access)
555 return find_access_in_subtree (access, offset, size);
561 add_link_to_rhs (struct access *racc, struct assign_link *link)
580 add_link_to_lhs (struct access *lacc, struct assign_link *link)
599 relink_to_new_repr (struct access *new_acc, struct access *old_acc)
651 /* Add ACCESS to the work to queue for propagation of subaccesses from RHS to
655 add_access_to_rhs_work_queue (struct access *access)
657 if (access->first_rhs_link && !access->grp_rhs_queued)
659 gcc_assert (!access->next_rhs_queued);
660 access->next_rhs_queued = rhs_work_queue_head;
661 access->grp_rhs_queued = 1;
662 rhs_work_queue_head = access;
666 /* Add ACCESS to the work to queue for propagation of subaccesses from LHS to
670 add_access_to_lhs_work_queue (struct access *access)
672 if (access->first_lhs_link && !access->grp_lhs_queued)
674 gcc_assert (!access->next_lhs_queued);
675 access->next_lhs_queued = lhs_work_queue_head;
676 access->grp_lhs_queued = 1;
677 lhs_work_queue_head = access;
681 /* Pop an access from the work queue for propagating from RHS to LHS, and
684 static struct access *
687 struct access *access = rhs_work_queue_head;
689 rhs_work_queue_head = access->next_rhs_queued;
690 access->next_rhs_queued = NULL;
691 access->grp_rhs_queued = 0;
692 return access;
695 /* Pop an access from the work queue for propagating from LHS to RHS, and
698 static struct access *
701 struct access *access = lhs_work_queue_head;
703 lhs_work_queue_head = access->next_lhs_queued;
704 access->next_lhs_queued = NULL;
705 access->grp_lhs_queued = 0;
706 return access;
871 /* Allocate an access structure for BASE, OFFSET and SIZE, clear it, fill in
873 the base. Finally, return the new access. */
875 static struct access *
878 struct access *access = access_pool.allocate ();
880 memset (access, 0, sizeof (struct access));
881 access->base = base;
882 access->offset = offset;
883 access->size = size;
885 base_access_vec->get_or_insert (base).safe_push (access);
887 return access;
892 /* Create and insert access for EXPR. Return created access, or NULL if it is
896 static struct access *
899 struct access *access;
939 disqualify_candidate (base, "Encountered a polynomial-sized access.");
952 disqualify_candidate (base, "Encountered a negative offset access.");
957 disqualify_candidate (base, "Encountered an unconstrained access.");
962 disqualify_candidate (base, "Encountered an access beyond the base.");
966 access = create_access_1 (base, offset, size);
967 access->expr = expr;
968 access->type = TREE_TYPE (expr);
969 access->write = write;
970 access->grp_unscalarizable_region = unscalarizable_region;
971 access->stmt = stmt;
972 access->reverse = reverse;
974 return access;
1116 /* Scan expression EXPR and create access structures for all accesses to
1117 candidates for scalarization. Return the created access or NULL if none is
1120 static struct access *
1123 struct access *ret = NULL;
1186 /* Scan expression EXPR and create access structures for all accesses to
1187 candidates for scalarization. Return true if any access has been inserted.
1194 struct access *access;
1196 access = build_access_from_expr_1 (expr, stmt, write);
1197 if (access)
1203 bitmap_set_bit (cannot_scalarize_away_bitmap, DECL_UID (access->base));
1260 /* Scan expressions occurring in STMT, create access structures for all accesses
1263 true if any access has been inserted. */
1269 struct access *lacc, *racc;
1364 /* Scan function and look for interesting expressions and create access
1365 structures for them. Return true iff any access is created. */
1463 access is considered smaller than another if it has smaller offset or if the
1601 /* Create a human readable name for replacement variable of ACCESS. */
1695 build_reconstructed_reference (location_t, tree base, struct access *model)
1730 expr to access it. GSI and INSERT_AFTER have the same meaning as in
1735 struct access *model, gimple_stmt_iterator *gsi,
1742 /* This access represents a bit-field. */
1780 struct access *model)
2080 static struct access *
2084 struct access *res, **prev_acc_ptr = &res;
2100 struct access *access = (*access_vec)[i];
2101 bool grp_write = access->write;
2102 bool grp_read = !access->write;
2103 bool grp_scalar_write = access->write
2104 && is_gimple_reg_type (access->type);
2105 bool grp_scalar_read = !access->write
2106 && is_gimple_reg_type (access->type);
2107 bool grp_assignment_read = access->grp_assignment_read;
2108 bool grp_assignment_write = access->grp_assignment_write;
2110 bool grp_partial_lhs = access->grp_partial_lhs;
2111 bool first_scalar = is_gimple_reg_type (access->type);
2112 bool unscalarizable_region = access->grp_unscalarizable_region;
2115 = (INTEGRAL_TYPE_P (access->type)
2116 && TYPE_PRECISION (access->type) != access->size
2117 && TREE_CODE (access->expr) == COMPONENT_REF
2118 && DECL_BIT_FIELD (TREE_OPERAND (access->expr, 1)));
2120 if (first || access->offset >= high)
2123 low = access->offset;
2124 high = access->offset + access->size;
2126 else if (access->offset > low && access->offset + access->size > high)
2129 gcc_assert (access->offset >= low
2130 && access->offset + access->size <= high);
2132 grp_same_access_path = path_comparable_for_same_access (access->expr);
2137 struct access *ac2 = (*access_vec)[j];
2138 if (ac2->offset != access->offset || ac2->size != access->size)
2161 relink_to_new_repr (access, ac2);
2176 access "
2179 dump_access (dump_file, access, false);
2185 && !same_access_path_p (access->expr, ac2->expr))
2188 ac2->group_representative = access;
2194 access->group_representative = access;
2195 access->grp_write = grp_write;
2196 access->grp_read = grp_read;
2197 access->grp_scalar_read = grp_scalar_read;
2198 access->grp_scalar_write = grp_scalar_write;
2199 access->grp_assignment_read = grp_assignment_read;
2200 access->grp_assignment_write = grp_assignment_write;
2201 access->grp_hint = multiple_scalar_reads && !constant_decl_p (var);
2202 access->grp_partial_lhs = grp_partial_lhs;
2203 access->grp_unscalarizable_region = unscalarizable_region;
2204 access->grp_same_access_path = grp_same_access_path;
2206 *prev_acc_ptr = access;
2207 prev_acc_ptr = &access->next_grp;
2214 /* Create a variable for the given ACCESS which determines the type, name and a
2216 ACCESS->replacement. REG_TREE is used when creating a declaration to base a
2218 warning. It is used instead of the actual ACCESS type if that is not of a
2222 create_access_replacement (struct access *access, tree reg_type = NULL_TREE)
2226 tree type = access->type;
2230 if (access->grp_to_be_debug_replaced)
2232 repl = create_tmp_var_raw (access->type);
2240 if (access->grp_partial_lhs
2244 DECL_SOURCE_LOCATION (repl) = DECL_SOURCE_LOCATION (access->base);
2246 DECL_IGNORED_P (repl) = DECL_IGNORED_P (access->base);
2248 if (DECL_NAME (access->base)
2249 && !DECL_IGNORED_P (access->base)
2250 && !DECL_ARTIFICIAL (access->base))
2252 char *pretty_name = make_fancy_name (access->expr);
2253 tree debug_expr = unshare_expr_without_location (access->expr), d;
2300 if (access->grp_no_warning)
2303 copy_warning (repl, access->base);
2310 if (access->grp_to_be_debug_replaced)
2313 print_generic_expr (dump_file, access->base);
2315 (unsigned) access->offset, (unsigned) access->size);
2320 print_generic_expr (dump_file, access->base);
2322 (unsigned) access->offset, (unsigned) access->size);
2332 /* Return ACCESS scalar replacement, which must exist. */
2335 get_access_replacement (struct access *access)
2337 gcc_checking_assert (access->replacement_decl);
2338 return access->replacement_decl;
2342 /* Build a subtree of accesses rooted in *ACCESS, and move the pointer in the
2343 linked list along the way. Stop when *ACCESS is NULL or the access pointed
2348 build_access_subtree (struct access **access)
2350 struct access *root = *access, *last_child = NULL;
2353 *access = (*access)->next_grp;
2354 while (*access && (*access)->offset + (*access)->size <= limit)
2357 root->first_child = *access;
2359 last_child->next_sibling = *access;
2360 last_child = *access;
2361 (*access)->parent = root;
2362 (*access)->grp_write |= root->grp_write;
2364 if (!build_access_subtree (access))
2368 if (*access && (*access)->offset < limit)
2374 /* Build a tree of access representatives, ACCESS is the pointer to the first
2379 build_access_trees (struct access *access)
2381 while (access)
2383 struct access *root = access;
2385 if (!build_access_subtree (&access))
2387 root->next_grp = access;
2392 /* Traverse the access forest where ROOT is the first root and verify that
2396 verify_sra_access_forest (struct access *root)
2398 struct access *access = root;
2403 gcc_assert (access->base == first_base);
2404 if (access->parent)
2405 gcc_assert (access->offset >= access->parent->offset
2406 && access->size <= access->parent->size);
2407 if (access->next_sibling)
2408 gcc_assert (access->next_sibling->offset
2409 >= access->offset + access->size);
2413 tree base = get_ref_base_and_extent (access->expr, &poffset, &psize,
2421 gcc_assert (offset == access->offset);
2422 gcc_assert (access->grp_unscalarizable_region
2423 || access->grp_total_scalarization
2425 gcc_assert (access->grp_unscalarizable_region
2426 || !is_gimple_reg_type (access->type)
2427 || size == access->size);
2428 gcc_assert (reverse == access->reverse);
2430 if (access->first_child)
2432 gcc_assert (access->first_child->parent == access);
2433 access = access->first_child;
2435 else if (access->next_sibling)
2437 gcc_assert (access->next_sibling->parent == access->parent);
2438 access = access->next_sibling;
2442 while (access->parent && !access->next_sibling)
2443 access = access->parent;
2444 if (access->next_sibling)
2445 access = access->next_sibling;
2448 gcc_assert (access == root);
2450 access = root;
2454 while (access);
2457 /* Verify access forests of all candidates with accesses by calling
2468 struct access *access = get_first_repr_for_decl (var);
2469 if (access)
2471 gcc_assert (access->base == var);
2472 verify_sra_access_forest (access);
2496 access flags appropriately along the way, notably always set grp_read and
2500 Creating a replacement for a scalar access is considered beneficial if its
2502 direct read access or that we are attempting total scalarization) or
2505 Access written to through a scalar type (once or more times)
2509 | | Access read as scalar _once_
2515 0 0 0 0 No access for the scalar
2516 0 0 0 1 No access for the scalar
2519 0 1 0 0 No access for the scalar
2520 0 1 0 1 No access for the scalar
2533 analyze_access_subtree (struct access *root, struct access *parent,
2536 struct access *child;
2586 /* Always create access replacements that cover the whole access.
2652 /* Analyze all access trees linked by next_grp by the means of
2655 analyze_access_trees (struct access *access)
2659 while (access)
2661 if (analyze_access_subtree (access, NULL, true,
2662 access->grp_total_scalarization))
2664 access = access->next_grp;
2675 child_would_conflict_in_acc (struct access *acc, HOST_WIDE_INT norm_offset,
2676 HOST_WIDE_INT size, struct access **exact_match)
2678 struct access *child;
2696 /* Create a new child access of PARENT, with all properties just like MODEL
2698 Return the new access or NULL if it cannot be created. Note that this
2699 access is created long after all splicing and sorting, it's not located in
2700 any access vector and is automatically a representative of its group. Set
2703 static struct access *
2704 create_artificial_child_access (struct access *parent, struct access *model,
2708 struct access **child;
2713 access *access = access_pool.allocate ();
2714 memset (access, 0, sizeof (struct access));
2718 access->grp_no_warning = true;
2723 access->base = parent->base;
2724 access->expr = expr;
2725 access->offset = new_offset;
2726 access->size = model->size;
2727 access->type = model->type;
2728 access->parent = parent;
2729 access->grp_read = set_grp_read;
2730 access->grp_write = set_grp_write;
2731 access->reverse = model->reverse;
2737 access->next_sibling = *child;
2738 *child = access;
2740 return access;
2744 /* Beginning with ACCESS, traverse its whole access subtree and mark all
2749 subtree_mark_written_and_rhs_enqueue (struct access *access)
2751 if (access->grp_write)
2753 access->grp_write = true;
2754 add_access_to_rhs_work_queue (access);
2756 struct access *child;
2757 for (child = access->first_child; child; child = child->next_sibling)
2761 /* If there is still budget to create a propagation access for DECL, return
2790 access_or_its_child_written (struct access *acc)
2794 for (struct access *sub = acc->first_child; sub; sub = sub->next_sibling)
2803 RACC is a scalar access but LACC is not, change the type of the latter, if
2807 propagate_subaccesses_from_rhs (struct access *lacc, struct access *racc)
2809 struct access *rchild;
2846 /* We are about to change the access type from aggregate to scalar,
2847 so we need to put the reverse flag onto the access, if any. */
2878 struct access *new_acc = NULL;
2952 propagate_subaccesses_from_lhs (struct access *lacc, struct access *racc)
2960 scalarization if lacc is a scalar access (and none fo the two have
2965 for (struct access *lchild = lacc->first_child;
2969 struct access *matching_acc = NULL;
2989 struct access *new_acc
3010 struct access *racc = pop_access_from_rhs_work_queue ();
3019 struct access *lacc = link->lacc;
3049 struct access *lacc = pop_access_from_lhs_work_queue ();
3061 struct access *racc = link->racc;
3078 can_totally_scalarize_forest_p (struct access *root)
3080 struct access *access = root;
3083 if (access->grp_unscalarizable_region
3084 || (access->offset % BITS_PER_UNIT) != 0
3085 || (access->size % BITS_PER_UNIT) != 0
3086 || (is_gimple_reg_type (access->type)
3087 && access->first_child))
3090 if (access->first_child)
3091 access = access->first_child;
3092 else if (access->next_sibling)
3093 access = access->next_sibling;
3096 while (access->parent && !access->next_sibling)
3097 access = access->parent;
3098 if (access->next_sibling)
3099 access = access->next_sibling;
3102 gcc_assert (access == root);
3104 access = root;
3108 while (access);
3112 /* Create and return an ACCESS in PARENT spanning from POS with SIZE, TYPE and
3116 static struct access *
3117 create_total_scalarization_access (struct access *parent, HOST_WIDE_INT pos,
3119 struct access **ptr,
3120 struct access *next_sibling)
3122 struct access *access = access_pool.allocate ();
3123 memset (access, 0, sizeof (struct access));
3124 access->base = parent->base;
3125 access->offset = pos;
3126 access->size = size;
3127 access->expr = expr;
3128 access->type = type;
3129 access->parent = parent;
3130 access->grp_write = parent->grp_write;
3131 access->grp_total_scalarization = 1;
3132 access->grp_hint = 1;
3133 access->grp_same_access_path = 0;
3134 access->reverse = reverse_storage_order_for_component_p (expr);
3136 access->next_sibling = next_sibling;
3137 *ptr = access;
3138 return access;
3141 /* Create and return an ACCESS in PARENT spanning from POS with SIZE, TYPE and
3145 be children of the new access. If a partial overlap is detected, return
3148 static struct access *
3149 create_total_access_and_reshape (struct access *parent, HOST_WIDE_INT pos,
3151 struct access **ptr)
3153 struct access **p = ptr;
3162 struct access *next_child = *ptr;
3163 struct access *new_acc
3170 for (struct access *a = next_child; a; a = a->next_sibling)
3176 static bool totally_scalarize_subtree (struct access *root);
3210 scalarization access for a field/element should be created, whether it
3222 creating a new access, TOTAL_FLD_DONE if access or accesses capable of
3228 total_should_skip_creating_access (struct access *parent,
3229 struct access **last_seen_sibling,
3233 struct access *next_child;
3239 /* First, traverse the chain of siblings until it points to an access with
3275 accesses, so if we go on and create an access for a register type,
3314 totally_scalarize_subtree (struct access *root)
3319 struct access *last_seen_sibling = NULL;
3351 struct access **p = (last_seen_sibling
3355 struct access *new_child
3412 struct access **p = (last_seen_sibling
3418 struct access *new_child
3456 struct access *access;
3458 access = sort_and_splice_var_accesses (var);
3459 if (!access || !build_access_trees (access))
3504 for (struct access *access = get_first_repr_for_decl (var);
3505 access;
3506 access = access->next_grp)
3507 if (!can_totally_scalarize_forest_p (access)
3508 || !scalarizable_type_p (access->type, constant_decl_p (var)))
3523 for (struct access *access = get_first_repr_for_decl (var);
3524 access;
3525 access = access->next_grp)
3526 if (!is_gimple_reg_type (access->type)
3527 && !totally_scalarize_subtree (access))
3534 for (struct access *access = get_first_repr_for_decl (var);
3535 access;
3536 access = access->next_grp)
3537 access->grp_total_scalarization = true;
3547 struct access *access = get_first_repr_for_decl (var);
3549 if (analyze_access_trees (access))
3557 dump_access_tree (dump_file, access);
3577 into or out of AGG. ACCESS, all its children, siblings and their children
3591 generate_subtree_copies (struct access *access, tree agg,
3602 if (chunk_size && access->offset >= start_offset + chunk_size)
3605 if (access->grp_to_be_replaced
3607 || access->offset + access->size > start_offset))
3609 tree expr, repl = get_access_replacement (access);
3612 expr = build_ref_for_model (loc, agg, access->offset - top_offset,
3613 access, gsi, insert_after);
3617 if (access->grp_partial_lhs)
3627 if (access->grp_partial_lhs)
3644 && access->grp_to_be_debug_replaced
3646 || access->offset + access->size > start_offset))
3650 access->offset - top_offset,
3651 access);
3652 ds = gimple_build_debug_bind (get_access_replacement (access),
3660 if (access->first_child)
3661 generate_subtree_copies (access->first_child, agg, top_offset,
3665 access = access->next_sibling;
3667 while (access);
3670 /* Assign zero to all scalar replacements in an access subtree. ACCESS is the
3676 init_subtree_with_zero (struct access *access, gimple_stmt_iterator *gsi,
3680 struct access *child;
3682 if (access->grp_to_be_replaced)
3686 stmt = gimple_build_assign (get_access_replacement (access),
3687 build_zero_cst (access->type));
3695 else if (access->grp_to_be_debug_replaced)
3698 = gimple_build_debug_bind (get_access_replacement (access),
3699 build_zero_cst (access->type),
3707 for (child = access->first_child; child; child = child->next_sibling)
3711 /* Clobber all scalar replacements in an access subtree. ACCESS is the
3717 clobber_subtree (struct access *access, gimple_stmt_iterator *gsi,
3721 struct access *child;
3723 if (access->grp_to_be_replaced)
3725 tree rep = get_access_replacement (access);
3726 tree clobber = build_clobber (access->type);
3737 for (child = access->first_child; child; child = child->next_sibling)
3741 /* Search for an access representative for the given expression EXPR and
3744 static struct access *
3792 struct access *access;
3809 access = get_access_for_expr (*expr);
3810 if (!access)
3823 if (access->grp_to_be_replaced)
3825 tree repl = get_access_replacement (access);
3826 /* If we replace a non-register typed access simply use the original
3827 access expression to extract the scalar component afterwards.
3836 if (!bfr && !useless_type_conversion_p (type, access->type))
3840 ref = build_ref_for_model (loc, orig_expr, 0, access, gsi, false);
3844 /* VIEW_CONVERT_EXPRs in partial complex access are always fine in
3850 gcc_checking_assert (!write || access->grp_partial_lhs);
3851 if (!access->grp_partial_lhs)
3865 if (access->grp_partial_lhs)
3874 if (TREE_READONLY (access->base))
3878 if (access->grp_partial_lhs)
3906 else if (write && access->grp_to_be_debug_replaced)
3908 gdebug *ds = gimple_build_debug_bind (get_access_replacement (access),
3914 if (access->first_child && !TREE_READONLY (access->base))
3922 start_offset = access->offset
3928 generate_subtree_copies (access->first_child, orig_expr, access->offset,
3944 /* Offset of the access representing the lhs of the assignment. */
3950 /* Access representing the rhs of the whole assignment. */
3951 struct access *top_racc;
3970 /* Store all replacements in the access tree rooted in TOP_RACC either to their
4000 /* Try to generate statements to load all sub-replacements in an access subtree
4006 load_assign_lhs_subreplacements (struct access *lacc,
4016 struct access *racc;
4034 /* No suitable access on the right hand side, need to load from
4069 struct access *racc = find_access_in_subtree (sad->top_racc,
4117 struct access *acc = get_access_for_expr (lhs);
4164 is an access describing an uninitialized part of an aggregate that is being
4169 get_repl_default_def_ssa_name (struct access *racc, tree reg_type)
4180 of accesses within a subtree ACCESS; all its children, siblings and their
4184 generate_subtree_deferred_init (struct access *access,
4192 if (access->grp_to_be_replaced)
4194 tree repl = get_access_replacement (access);
4205 if (access->first_child)
4206 generate_subtree_deferred_init (access->first_child, init_type,
4209 access = access ->next_sibling;
4211 while (access);
4229 struct access *lhs_access = get_access_for_expr (lhs);
4269 struct access *lacc, *racc;
4401 from the RHS or vice versa (the access representing this level can have
4455 /* When an access represents an unscalarizable region, it usually
4544 struct access *access = get_first_repr_for_decl (var);
4546 while (access)
4548 if (access->replacement_decl)
4551 = gimple_build_assign (get_access_replacement (access),
4552 unshare_expr (access->expr));
4563 if (access->first_child)
4564 access = access->first_child;
4565 else if (access->next_sibling)
4566 access = access->next_sibling;
4569 while (access->parent && !access->next_sibling)
4570 access = access->parent;
4571 if (access->next_sibling)
4572 access = access->next_sibling;
4574 access = access->next_grp;
4699 struct access *access;
4707 for (access = (*access_vec)[0];
4708 access;
4709 access = access->next_grp)
4710 generate_subtree_copies (access, parm, 0, 0, 0, &gsi, true, true,