21#ifndef GCC_TREE_DATA_REF_H
22#define GCC_TREE_DATA_REF_H
184#define DR_STMT(DR) (DR)->stmt
185#define DR_REF(DR) (DR)->ref
186#define DR_BASE_OBJECT(DR) (DR)->indices.base_object
187#define DR_UNCONSTRAINED_BASE(DR) (DR)->indices.unconstrained_base
188#define DR_ACCESS_FNS(DR) (DR)->indices.access_fns
189#define DR_ACCESS_FN(DR, I) DR_ACCESS_FNS (DR)[I]
190#define DR_NUM_DIMENSIONS(DR) DR_ACCESS_FNS (DR).length ()
191#define DR_IS_READ(DR) (DR)->is_read
192#define DR_IS_WRITE(DR) (!DR_IS_READ (DR))
193#define DR_IS_CONDITIONAL_IN_STMT(DR) (DR)->is_conditional_in_stmt
194#define DR_BASE_ADDRESS(DR) (DR)->innermost.base_address
195#define DR_OFFSET(DR) (DR)->innermost.offset
196#define DR_INIT(DR) (DR)->innermost.init
197#define DR_STEP(DR) (DR)->innermost.step
198#define DR_PTR_INFO(DR) (DR)->alias.ptr_info
199#define DR_BASE_ALIGNMENT(DR) (DR)->innermost.base_alignment
200#define DR_BASE_MISALIGNMENT(DR) (DR)->innermost.base_misalignment
201#define DR_OFFSET_ALIGNMENT(DR) (DR)->innermost.offset_alignment
202#define DR_STEP_ALIGNMENT(DR) (DR)->innermost.step_alignment
203#define DR_INNERMOST(DR) (DR)->innermost
324 : first (
d1), second (
d2), flags (0)
358#define NO_DEPENDENCE 0
359#define NOT_KNOWN (MAX_DIM + 1)
360#define CF_NONTRIVIAL_P(CF) ((CF)->n != NO_DEPENDENCE && (CF)->n != NOT_KNOWN)
361#define CF_NOT_KNOWN_P(CF) ((CF)->n == NOT_KNOWN)
362#define CF_NO_DEPENDENCE_P(CF) ((CF)->n == NO_DEPENDENCE)
402#define SUB_ACCESS_FN(SUB, I) (SUB)->access_fn[I]
403#define SUB_CONFLICTS_IN_A(SUB) (SUB)->conflicting_iterations_in_a
404#define SUB_CONFLICTS_IN_B(SUB) (SUB)->conflicting_iterations_in_b
405#define SUB_LAST_CONFLICT(SUB) (SUB)->last_conflict
406#define SUB_DISTANCE(SUB) (SUB)->distance
492#define DDR_A(DDR) (DDR)->a
493#define DDR_B(DDR) (DDR)->b
494#define DDR_AFFINE_P(DDR) (DDR)->affine_p
495#define DDR_ARE_DEPENDENT(DDR) (DDR)->are_dependent
496#define DDR_OBJECT_A(DDR) (DDR)->object_a
497#define DDR_OBJECT_B(DDR) (DDR)->object_b
498#define DDR_SUBSCRIPTS(DDR) (DDR)->subscripts
499#define DDR_SUBSCRIPT(DDR, I) DDR_SUBSCRIPTS (DDR)[I]
500#define DDR_NUM_SUBSCRIPTS(DDR) DDR_SUBSCRIPTS (DDR).length ()
502#define DDR_LOOP_NEST(DDR) (DDR)->loop_nest
505#define DDR_NB_LOOPS(DDR) (DDR_LOOP_NEST (DDR).length ())
506#define DDR_SELF_REFERENCE(DDR) (DDR)->self_reference_p
508#define DDR_DIST_VECTS(DDR) ((DDR)->dist_vects)
509#define DDR_DIR_VECTS(DDR) ((DDR)->dir_vects)
510#define DDR_NUM_DIST_VECTS(DDR) \
511 (DDR_DIST_VECTS (DDR).length ())
512#define DDR_NUM_DIR_VECTS(DDR) \
513 (DDR_DIR_VECTS (DDR).length ())
514#define DDR_DIR_VECT(DDR, I) \
515 DDR_DIR_VECTS (DDR)[I]
516#define DDR_DIST_VECT(DDR, I) \
517 DDR_DIST_VECTS (DDR)[I]
518#define DDR_REVERSED_P(DDR) (DDR)->reversed_p
519#define DDR_COULD_BE_INDEPENDENT_P(DDR) (DDR)->could_be_independent_p
649 for (
i = 0;
i < length;
i++)
650 if (dist_vect[
i] != 0)
681 for (var_index = 0; loop_nest.iterate (var_index, &loopi); var_index++)
682 if (loopi->
num == var)
721 for (
i = 1;
i < size;
i++)
722 gcd1 =
gcd (gcd1, vector[
i]);
741 memset (vec1, 0, size *
sizeof (*vec1));
752 for (
i = 0;
i < n;
i++)
770 for (
i = 0;
i < size;
i++)
786 for (
i = 0;
i < m;
i++)
787 mat[
i] = XOBNEWVEC (lambda_obstack,
lambda_int, n);
class loop * loop_p
Definition cfgloop.h:98
Definition tree-data-ref.h:307
sequencing
Definition tree-data-ref.h:311
@ REORDERED
Definition tree-data-ref.h:311
@ WELL_ORDERED
Definition tree-data-ref.h:311
dr_with_seg_len_pair_t(const dr_with_seg_len &, const dr_with_seg_len &, sequencing)
Definition tree-data-ref.h:322
dr_with_seg_len second
Definition tree-data-ref.h:317
dr_with_seg_len first
Definition tree-data-ref.h:316
unsigned int flags
Definition tree-data-ref.h:318
Definition tree-data-ref.h:212
poly_uint64 access_size
Definition tree-data-ref.h:224
unsigned int align
Definition tree-data-ref.h:227
data_reference_p dr
Definition tree-data-ref.h:218
tree seg_len
Definition tree-data-ref.h:221
dr_with_seg_len(data_reference_p d, tree len, unsigned HOST_WIDE_INT size, unsigned int a)
Definition tree-data-ref.h:214
int num
Definition cfgloop.h:124
Definition opt-problem.h:179
bool debug
Definition collect-utils.cc:34
class edge_def * edge
Definition coretypes.h:352
union tree_node * tree
Definition coretypes.h:97
bool operand_equal_p(const_tree arg0, const_tree arg1, unsigned int flags)
Definition fold-const.cc:4322
#define fold_unary(CODE, T1, T2)
Definition fold-const.h:56
volatile double d2
Definition fp-test.cc:81
volatile double d1
Definition fp-test.cc:81
static struct obstack obstack
Definition gcc.cc:360
T * ggc_cleared_vec_alloc(size_t c CXX_MEM_STAT_INFO)
Definition ggc.h:233
HOST_WIDE_INT gcd(HOST_WIDE_INT a, HOST_WIDE_INT b)
Definition hwint.cc:132
if(N >=2) for(unsigned int i
i
Definition poly-int.h:776
Ca const poly_int< N, Cb > & b
Definition poly-int.h:771
Ca & a
Definition poly-int.h:770
rtx offset
Definition postreload.cc:691
Definition basic-block.h:117
Definition tree-data-ref.h:367
affine_fn fns[MAX_DIM]
Definition tree-data-ref.h:369
unsigned n
Definition tree-data-ref.h:368
Definition tree-data-ref.h:412
vec< lambda_vector > dir_vects
Definition tree-data-ref.h:446
vec< subscript_p > subscripts
Definition tree-data-ref.h:440
bool could_be_independent_p
Definition tree-data-ref.h:487
vec< loop_p > loop_nest
Definition tree-data-ref.h:443
struct data_reference * a
Definition tree-data-ref.h:414
struct data_reference * b
Definition tree-data-ref.h:415
tree are_dependent
Definition tree-data-ref.h:428
tree object_b
Definition tree-data-ref.h:435
bool affine_p
Definition tree-data-ref.h:456
bool self_reference_p
Definition tree-data-ref.h:460
tree object_a
Definition tree-data-ref.h:434
bool reversed_p
Definition tree-data-ref.h:452
vec< lambda_vector > dist_vects
Definition tree-data-ref.h:449
Definition tree-data-ref.h:151
tree ref
Definition tree-data-ref.h:156
struct dr_alias alias
Definition tree-data-ref.h:170
void * aux
Definition tree-data-ref.h:159
struct indices alt_indices
Definition tree-data-ref.h:181
bool is_read
Definition tree-data-ref.h:162
gimple * stmt
Definition tree-data-ref.h:153
bool is_conditional_in_stmt
Definition tree-data-ref.h:167
struct innermost_loop_behavior innermost
Definition tree-data-ref.h:173
Definition tree-data-ref.h:131
struct ptr_info_def * ptr_info
Definition tree-data-ref.h:134
Definition tree-data-ref.h:118
vec< tree > access_fns
Definition tree-data-ref.h:123
bool unconstrained_base
Definition tree-data-ref.h:127
tree base_object
Definition tree-data-ref.h:120
Definition tree-data-ref.h:50
unsigned int base_misalignment
Definition tree-data-ref.h:90
tree base_address
Definition tree-data-ref.h:51
tree step
Definition tree-data-ref.h:54
tree offset
Definition tree-data-ref.h:52
tree init
Definition tree-data-ref.h:53
unsigned int base_alignment
Definition tree-data-ref.h:89
unsigned int step_alignment
Definition tree-data-ref.h:98
unsigned int offset_alignment
Definition tree-data-ref.h:95
Definition tree-ssanames.h:26
Definition tree-data-ref.h:380
tree access_fn[2]
Definition tree-data-ref.h:382
tree distance
Definition tree-data-ref.h:397
conflict_function * conflicting_iterations_in_a
Definition tree-data-ref.h:386
tree last_conflict
Definition tree-data-ref.h:391
conflict_function * conflicting_iterations_in_b
Definition tree-data-ref.h:387
#define gcc_unreachable()
Definition system.h:841
#define MIN(X, Y)
Definition system.h:396
bool eq_evolutions_p(const_tree chrec0, const_tree chrec1)
Definition tree-chrec.cc:1712
#define DDR_DIST_VECT(DDR, I)
Definition tree-data-ref.h:516
#define DR_IS_WRITE(DR)
Definition tree-data-ref.h:192
struct data_reference * create_data_ref(edge, loop_p, tree, gimple *, bool, bool)
Definition tree-data-ref.cc:1502
bool dr_known_forward_stride_p(struct data_reference *)
Definition tree-data-ref.cc:6464
bool lambda_vector_zerop(lambda_vector vec1, int size)
Definition tree-data-ref.h:767
lambda_vector * lambda_matrix
Definition tree-data-ref.h:146
tree find_data_references_in_loop(class loop *, vec< data_reference_p > *)
Definition tree-data-ref.cc:6095
bool lambda_vector_lexico_pos(lambda_vector v, unsigned n)
Definition tree-data-ref.h:748
lambda_vector lambda_vector_new(int size)
Definition tree-data-ref.h:730
void free_dependence_relation(struct data_dependence_relation *)
Definition tree-data-ref.cc:6341
#define DR_IS_READ(DR)
Definition tree-data-ref.h:191
bool known_dependences_p(vec< ddr_p > dependence_relations)
Definition tree-data-ref.h:628
void debug_ddrs(vec< ddr_p >)
Definition tree-data-ref.cc:563
#define DDR_DIST_VECTS(DDR)
Definition tree-data-ref.h:508
void debug_data_references(vec< data_reference_p >)
Definition tree-data-ref.cc:201
const unsigned int DR_ALIAS_UNSWAPPED
Definition tree-data-ref.h:300
bool compute_data_dependences_for_loop(class loop *, bool, vec< loop_p > *, vec< data_reference_p > *, vec< ddr_p > *)
Definition tree-data-ref.cc:6267
bool compute_all_dependences(const vec< data_reference_p > &, vec< ddr_p > *, const vec< loop_p > &, bool)
Definition tree-data-ref.cc:5771
tree find_data_references_in_bb(class loop *, basic_block, vec< data_reference_p > *)
Definition tree-data-ref.cc:6065
const unsigned int DR_ALIAS_WAW
Definition tree-data-ref.h:297
void prune_runtime_alias_test_list(vec< dr_with_seg_len_pair_t > *, poly_uint64)
Definition tree-data-ref.cc:1808
struct data_dependence_relation * initialize_data_dependence_relation(struct data_reference *, struct data_reference *, vec< loop_p >)
Definition tree-data-ref.cc:3502
void debug_data_dependence_relation(const data_dependence_relation *)
void compute_self_dependence(struct data_dependence_relation *)
lambda_int * lambda_vector
Definition tree-data-ref.h:142
void lambda_vector_clear(lambda_vector vec1, int size)
Definition tree-data-ref.h:739
void free_dependence_relations(vec< ddr_p > &)
Definition tree-data-ref.cc:6358
const unsigned int DR_ALIAS_ARBITRARY
Definition tree-data-ref.h:298
tree get_base_for_alignment(tree, unsigned int *)
Definition tree-data-ref.cc:6205
void dump_data_dependence_relations(FILE *, const vec< ddr_p > &)
Definition tree-data-ref.cc:492
bool dr_equal_offsets_p(struct data_reference *, struct data_reference *)
Definition tree-data-ref.cc:2732
bool graphite_find_data_references_in_stmt(edge, loop_p, gimple *, vec< data_reference_p > *)
Definition tree-data-ref.cc:6039
struct subscript * subscript_p
Definition tree-data-ref.h:400
#define DDR_NB_LOOPS(DDR)
Definition tree-data-ref.h:505
lambda_matrix lambda_matrix_new(int m, int n, struct obstack *lambda_obstack)
Definition tree-data-ref.h:779
opt_result dr_analyze_innermost(innermost_loop_behavior *, tree, class loop *, const gimple *)
Definition tree-data-ref.cc:1135
#define MAX_DIM
Definition tree-data-ref.h:355
#define DR_ACCESS_FN(DR, I)
Definition tree-data-ref.h:189
#define DR_REF(DR)
Definition tree-data-ref.h:185
const unsigned int DR_ALIAS_MIXED_STEPS
Definition tree-data-ref.h:301
unsigned dependence_level(lambda_vector dist_vect, int length)
Definition tree-data-ref.h:645
void debug_data_dependence_relations(vec< ddr_p >)
Definition tree-data-ref.cc:517
lambda_int lambda_vector_gcd(lambda_vector vector, int size)
Definition tree-data-ref.h:713
tree dr_zero_step_indicator(struct data_reference *)
Definition tree-data-ref.cc:6455
#define DR_BASE_OBJECT(DR)
Definition tree-data-ref.h:186
const unsigned int DR_ALIAS_RAW
Definition tree-data-ref.h:295
bool same_data_refs(data_reference_p a, data_reference_p b, int offset=0)
Definition tree-data-ref.h:607
void compute_affine_dependence(struct data_dependence_relation *, loop_p)
int index_in_loop_nest(int var, const vec< loop_p > &loop_nest)
Definition tree-data-ref.h:676
bool same_data_refs_base_objects(data_reference_p a, data_reference_p b)
Definition tree-data-ref.h:596
void create_runtime_alias_checks(class loop *, const vec< dr_with_seg_len_pair_t > *, tree *)
Definition tree-data-ref.cc:2674
opt_result runtime_alias_check_p(ddr_p, class loop *, bool)
Definition tree-data-ref.cc:1635
bool dr_may_alias_p(const struct data_reference *, const struct data_reference *, class loop *)
Definition tree-data-ref.cc:2986
int data_ref_compare_tree(tree, tree)
Definition tree-data-ref.cc:1560
void free_data_ref(data_reference_p)
Definition tree-data-ref.cc:1483
void free_data_refs(vec< data_reference_p > &)
Definition tree-data-ref.cc:6370
struct data_dependence_relation * ddr_p
Definition tree-data-ref.h:490
#define DR_STEP(DR)
Definition tree-data-ref.h:197
void split_constant_offset(tree, tree *, tree *)
Definition tree-data-ref.cc:1081
unsigned ddr_dependence_level(ddr_p ddr)
Definition tree-data-ref.h:659
void dump_data_reference(FILE *, struct data_reference *)
Definition tree-data-ref.cc:217
unsigned int dr_alignment(innermost_loop_behavior *)
Definition tree-data-ref.cc:6122
bool find_loop_nest(class loop *, vec< loop_p > *)
Definition tree-data-ref.cc:6251
bool loop_nest_has_data_refs(loop_p loop)
Definition tree-data-ref.cc:5980
#define DDR_ARE_DEPENDENT(DDR)
Definition tree-data-ref.h:495
void debug_data_reference(struct data_reference *)
Definition tree-data-ref.cc:209
bool adjacent_dr_p(struct data_reference *dr)
Definition tree-data-ref.h:692
opt_result find_data_references_in_stmt(class loop *, gimple *, vec< data_reference_p > *)
Definition tree-data-ref.cc:6010
struct data_reference * data_reference_p
Definition tree-data-ref.h:205
data_dependence_direction
Definition tree-data-ref.h:338
@ dir_positive
Definition tree-data-ref.h:339
@ dir_positive_or_equal
Definition tree-data-ref.h:343
@ dir_star
Definition tree-data-ref.h:345
@ dir_negative
Definition tree-data-ref.h:340
@ dir_positive_or_negative
Definition tree-data-ref.h:342
@ dir_independent
Definition tree-data-ref.h:346
@ dir_negative_or_equal
Definition tree-data-ref.h:344
@ dir_equal
Definition tree-data-ref.h:341
#define DDR_NUM_DIST_VECTS(DDR)
Definition tree-data-ref.h:510
const unsigned int DR_ALIAS_WAR
Definition tree-data-ref.h:296
const unsigned int DR_ALIAS_SWAPPED
Definition tree-data-ref.h:299
HOST_WIDE_INT lambda_int
Definition tree-data-ref.h:141
tree dr_direction_indicator(struct data_reference *)
Definition tree-data-ref.cc:6447
vec< tree > affine_fn
Definition tree-data-ref.h:364
#define DR_NUM_DIMENSIONS(DR)
Definition tree-data-ref.h:190
#define DR_INNERMOST(DR)
Definition tree-data-ref.h:203
bool tree_int_cst_equal(const_tree t1, const_tree t2)
Definition tree.cc:6423
#define chrec_dont_know
Definition tree.h:4673
#define TREE_OPERAND(NODE, I)
Definition tree.h:1300
#define TYPE_SIZE_UNIT(NODE)
Definition tree.h:2285
#define TREE_CODE(NODE)
Definition tree.h:324
#define DECL_BIT_FIELD(NODE)
Definition tree.h:3096
#define TREE_TYPE(NODE)
Definition tree.h:512
#define FOR_EACH_VEC_ELT(V, I, P)
Definition vec.h:1884