GCC Middle and Back End API Reference
|
Data Fields | |
HOST_WIDE_INT | offset |
HOST_WIDE_INT | size |
tree | base |
tree | expr |
tree | type |
gimple | stmt |
struct access * | next_grp |
struct access * | group_representative |
struct access * | first_child |
struct access * | next_sibling |
struct assign_link * | first_link |
struct assign_link * | last_link |
struct access * | next_queued |
tree | replacement_decl |
unsigned | write: 1 |
unsigned | non_addressable: 1 |
unsigned | grp_queued: 1 |
unsigned | grp_write: 1 |
unsigned | grp_read: 1 |
unsigned | grp_assignment_read: 1 |
unsigned | grp_assignment_write: 1 |
unsigned | grp_scalar_read: 1 |
unsigned | grp_scalar_write: 1 |
unsigned | grp_total_scalarization: 1 |
unsigned | grp_hint: 1 |
unsigned | grp_covered: 1 |
unsigned | grp_unscalarizable_region: 1 |
unsigned | grp_unscalarized_data: 1 |
unsigned | grp_partial_lhs: 1 |
unsigned | grp_to_be_replaced: 1 |
unsigned | grp_to_be_debug_replaced: 1 |
unsigned | grp_no_warning: 1 |
unsigned | grp_maybe_modified: 1 |
unsigned | grp_scalar_ptr: 1 |
unsigned | grp_not_necessarilly_dereferenced: 1 |
ACCESS represents each access to an aggregate variable (as a whole or a part). It can also represent a group of accesses that refer to exactly the same fragment of an aggregate (i.e. those that have exactly the same offset and size). Such representatives for a single aggregate, once determined, are linked in a linked list and have the group fields set.
Moreover, when doing intraprocedural SRA, a tree is built from those representatives (by the means of first_child and next_sibling pointers), in which all items in a subtree are "within" the root, i.e. their offset is greater or equal to offset of the root and offset+size is smaller or equal to offset+size of the root. Children of an access are sorted by offset.
Note that accesses to parts of vector and complex number types always represented by an access to the whole complex number or a vector. It is a duty of the modifying functions to replace them appropriately.
tree access::base |
tree access::expr |
Expression. It is context dependent so do not use it to create new expressions to access the original aggregate. See PR 42154 for a testcase.
Referenced by generate_subtree_copies(), make_fancy_name(), and propagate_dereference_distances().
struct access* access::first_child |
If this access has any children (in terms of the definition above), this points to the first one.
Referenced by contains_vce_or_bfcref_p(), dump_access(), dump_access_tree_1(), and generate_subtree_copies().
struct assign_link* access::first_link |
Pointers to the first and last element in the linked list of assign links.
Referenced by child_would_conflict_in_lacc().
struct access* access::group_representative |
Pointer to the group representative. Pointer to itself if the struct is the representative.
Referenced by child_would_conflict_in_lacc().
unsigned access::grp_assignment_read |
Does this group contain a read access that comes from an assignment statement? This flag is propagated down the access tree.
Referenced by build_access_from_expr_1(), expr_with_var_bounded_array_refs_p(), and reject().
unsigned access::grp_assignment_write |
Does this group contain a write access that comes from an assignment statement? This flag is propagated down the access tree.
Referenced by build_access_from_expr_1(), and reject().
unsigned access::grp_covered |
Is the subtree rooted in this access fully covered by scalar replacements?
Referenced by get_access_replacement().
unsigned access::grp_hint |
Other passes of the analysis use this bit to make function analyze_access_subtree create scalar replacements for this group if possible.
unsigned access::grp_maybe_modified |
Is it possible that the group refers to data which might be (directly or otherwise) modified?
Referenced by make_pass_sra().
unsigned access::grp_no_warning |
Should TREE_NO_WARNING of a replacement be set?
unsigned access::grp_not_necessarilly_dereferenced |
Set when we discover that this pointer is not safe to dereference in the caller.
unsigned access::grp_partial_lhs |
Does this access and/or group contain a write access through a BIT_FIELD_REF?
Referenced by generate_subtree_copies(), and sra_modify_expr().
unsigned access::grp_queued |
Is this access currently in the work queue?
Referenced by get_first_repr_for_decl(), and get_var_base_offset_size_access().
unsigned access::grp_read |
Does this group contain a read access? This flag is propagated down the access tree.
Referenced by reject().
unsigned access::grp_scalar_ptr |
Set when this is a representative of a pointer to scalar (i.e. by reference) parameter which we consider for turning into a plain scalar (i.e. a by value parameter).
unsigned access::grp_scalar_read |
Does this group contain a read access through a scalar type? This flag is not propagated in the access tree in any direction.
Referenced by expr_with_var_bounded_array_refs_p(), and reject().
unsigned access::grp_scalar_write |
Does this group contain a write access through a scalar type? This flag is not propagated in the access tree in any direction.
Referenced by reject().
unsigned access::grp_to_be_debug_replaced |
Set when we want a replacement for the sole purpose of having it in generated debug statements.
Referenced by expr_with_var_bounded_array_refs_p(), generate_subtree_copies(), and load_assign_lhs_subreplacements().
unsigned access::grp_to_be_replaced |
Set when a scalar replacement should be created for this variable.
Referenced by generate_subtree_copies(), load_assign_lhs_subreplacements(), and sra_modify_expr().
unsigned access::grp_total_scalarization |
Is this access an artificial one created to scalarize some record entirely?
Referenced by get_access_replacement().
unsigned access::grp_unscalarizable_region |
If set to true, this access and all below it in an access tree must not be scalarized.
Referenced by build_access_from_expr_1().
unsigned access::grp_unscalarized_data |
Whether data have been written to parts of the aggregate covered by this access which is not to be scalarized. This flag is propagated up in the access tree.
Referenced by get_access_replacement().
unsigned access::grp_write |
Does this group contain a write access? This flag is propagated down the access tree.
Referenced by reject().
struct assign_link * access::last_link |
struct access* access::next_grp |
Next group representative for this aggregate.
Referenced by access_has_children_p(), analyze_caller_dereference_legality(), and is_unused_scalar_param().
struct access* access::next_queued |
Pointer to the next access in the work queue.
Referenced by get_first_repr_for_decl(), and get_var_base_offset_size_access().
struct access* access::next_sibling |
In intraprocedural SRA, pointer to the next sibling in the access tree as described above. In IPA-SRA this is a pointer to the next access belonging to the same group (having the same representative).
Referenced by dump_access_tree_1().
unsigned access::non_addressable |
Is this access an access to a non-addressable field?
Referenced by analyze_caller_dereference_legality().
HOST_WIDE_INT access::offset |
Values returned by `get_ref_base_and_extent' for each component reference If EXPR isn't a component reference just set `BASE = EXPR', `OFFSET = 0', `SIZE = TREE_SIZE (TREE_TYPE (expr))'.
Referenced by access_has_children_p(), analyze_access_subtree(), dump_access_tree_1(), generate_subtree_copies(), get_access_replacement(), init_subtree_with_zero(), and sra_modify_expr().
tree access::replacement_decl |
Replacement variable for this access "region." Never to be accessed directly, always only by the means of get_access_replacement() and only when grp_to_be_replaced flag is set.
Referenced by expr_with_var_bounded_array_refs_p(), and load_assign_lhs_subreplacements().
HOST_WIDE_INT access::size |
gimple access::stmt |
The statement this access belongs to.
Referenced by generate_subtree_copies(), propagate_dereference_distances(), and sra_modify_expr().
tree access::type |
Type.
Referenced by build_access_from_expr_1(), generate_subtree_copies(), reject(), and sra_modify_expr().
unsigned access::write |
Is this particular access write access?
Referenced by propagate_dereference_distances(), and reject().