21#ifndef GCC_TREE_DATA_REF_H
22#define GCC_TREE_DATA_REF_H
188#define DR_STMT(DR) (DR)->stmt
189#define DR_REF(DR) (DR)->ref
190#define DR_BASE_OBJECT(DR) (DR)->indices.base_object
191#define DR_UNCONSTRAINED_BASE(DR) (DR)->indices.unconstrained_base
192#define DR_ACCESS_FNS(DR) (DR)->indices.access_fns
193#define DR_ACCESS_FN(DR, I) DR_ACCESS_FNS (DR)[I]
194#define DR_NUM_DIMENSIONS(DR) DR_ACCESS_FNS (DR).length ()
195#define DR_IS_READ(DR) (DR)->is_read
196#define DR_IS_WRITE(DR) (!DR_IS_READ (DR))
197#define DR_IS_CONDITIONAL_IN_STMT(DR) (DR)->is_conditional_in_stmt
198#define DR_BASE_ADDRESS(DR) (DR)->innermost.base_address
199#define DR_OFFSET(DR) (DR)->innermost.offset
200#define DR_INIT(DR) (DR)->innermost.init
201#define DR_STEP(DR) (DR)->innermost.step
202#define DR_PTR_INFO(DR) (DR)->alias.ptr_info
203#define DR_BASE_ALIGNMENT(DR) (DR)->innermost.base_alignment
204#define DR_BASE_MISALIGNMENT(DR) (DR)->innermost.base_misalignment
205#define DR_OFFSET_ALIGNMENT(DR) (DR)->innermost.offset_alignment
206#define DR_STEP_ALIGNMENT(DR) (DR)->innermost.step_alignment
207#define DR_INNERMOST(DR) (DR)->innermost
208#define DR_NOWRAP_BOUND(DR) (DR)->nowrap_bound
363#define NO_DEPENDENCE 0
364#define NOT_KNOWN (MAX_DIM + 1)
365#define CF_NONTRIVIAL_P(CF) ((CF)->n != NO_DEPENDENCE && (CF)->n != NOT_KNOWN)
366#define CF_NOT_KNOWN_P(CF) ((CF)->n == NOT_KNOWN)
367#define CF_NO_DEPENDENCE_P(CF) ((CF)->n == NO_DEPENDENCE)
407#define SUB_ACCESS_FN(SUB, I) (SUB)->access_fn[I]
408#define SUB_CONFLICTS_IN_A(SUB) (SUB)->conflicting_iterations_in_a
409#define SUB_CONFLICTS_IN_B(SUB) (SUB)->conflicting_iterations_in_b
410#define SUB_LAST_CONFLICT(SUB) (SUB)->last_conflict
411#define SUB_DISTANCE(SUB) (SUB)->distance
497#define DDR_A(DDR) (DDR)->a
498#define DDR_B(DDR) (DDR)->b
499#define DDR_AFFINE_P(DDR) (DDR)->affine_p
500#define DDR_ARE_DEPENDENT(DDR) (DDR)->are_dependent
501#define DDR_OBJECT_A(DDR) (DDR)->object_a
502#define DDR_OBJECT_B(DDR) (DDR)->object_b
503#define DDR_SUBSCRIPTS(DDR) (DDR)->subscripts
504#define DDR_SUBSCRIPT(DDR, I) DDR_SUBSCRIPTS (DDR)[I]
505#define DDR_NUM_SUBSCRIPTS(DDR) DDR_SUBSCRIPTS (DDR).length ()
507#define DDR_LOOP_NEST(DDR) (DDR)->loop_nest
510#define DDR_NB_LOOPS(DDR) (DDR_LOOP_NEST (DDR).length ())
511#define DDR_SELF_REFERENCE(DDR) (DDR)->self_reference_p
513#define DDR_DIST_VECTS(DDR) ((DDR)->dist_vects)
514#define DDR_DIR_VECTS(DDR) ((DDR)->dir_vects)
515#define DDR_NUM_DIST_VECTS(DDR) \
516 (DDR_DIST_VECTS (DDR).length ())
517#define DDR_NUM_DIR_VECTS(DDR) \
518 (DDR_DIR_VECTS (DDR).length ())
519#define DDR_DIR_VECT(DDR, I) \
520 DDR_DIR_VECTS (DDR)[I]
521#define DDR_DIST_VECT(DDR, I) \
522 DDR_DIST_VECTS (DDR)[I]
523#define DDR_REVERSED_P(DDR) (DDR)->reversed_p
524#define DDR_COULD_BE_INDEPENDENT_P(DDR) (DDR)->could_be_independent_p
657 for (
i = 0;
i < length;
i++)
658 if (dist_vect[
i] != 0)
689 for (var_index = 0; loop_nest.iterate (var_index, &loopi); var_index++)
690 if (loopi->
num == var)
729 for (
i = 1;
i < size;
i++)
730 gcd1 =
gcd (gcd1, vector[
i]);
749 memset (vec1, 0, size *
sizeof (*vec1));
760 for (
i = 0;
i < n;
i++)
778 for (
i = 0;
i < size;
i++)
794 for (
i = 0;
i < m;
i++)
795 mat[
i] = XOBNEWVEC (lambda_obstack,
lambda_int, n);
class loop * loop_p
Definition cfgloop.h:98
sequencing
Definition tree-data-ref.h:316
@ REORDERED
Definition tree-data-ref.h:316
@ WELL_ORDERED
Definition tree-data-ref.h:316
dr_with_seg_len_pair_t(const dr_with_seg_len &, const dr_with_seg_len &, sequencing)
Definition tree-data-ref.h:327
dr_with_seg_len second
Definition tree-data-ref.h:322
dr_with_seg_len first
Definition tree-data-ref.h:321
unsigned int flags
Definition tree-data-ref.h:323
Definition tree-data-ref.h:217
poly_uint64 access_size
Definition tree-data-ref.h:229
unsigned int align
Definition tree-data-ref.h:232
data_reference_p dr
Definition tree-data-ref.h:223
tree seg_len
Definition tree-data-ref.h:226
dr_with_seg_len(data_reference_p d, tree len, unsigned HOST_WIDE_INT size, unsigned int a)
Definition tree-data-ref.h:219
int num
Definition cfgloop.h:124
Definition opt-problem.h:179
bool debug
Definition collect-utils.cc:34
struct basic_block_def * basic_block
Definition coretypes.h:359
class edge_def * edge
Definition coretypes.h:356
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:4359
#define fold_unary(CODE, T1, T2)
Definition fold-const.h:60
volatile double d2
Definition fp-test.cc:81
volatile double d1
Definition fp-test.cc:81
T * ggc_cleared_vec_alloc(size_t c CXX_MEM_STAT_INFO)
Definition ggc.h:244
HOST_WIDE_INT gcd(HOST_WIDE_INT a, HOST_WIDE_INT b)
Definition hwint.cc:132
poly_int< NUM_POLY_INT_COEFFS, unsigned HOST_WIDE_INT > poly_uint64
Definition poly-int-types.h:25
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
Definition tree-data-ref.h:372
affine_fn fns[MAX_DIM]
Definition tree-data-ref.h:374
unsigned n
Definition tree-data-ref.h:373
Definition tree-data-ref.h:417
vec< lambda_vector > dir_vects
Definition tree-data-ref.h:451
vec< subscript_p > subscripts
Definition tree-data-ref.h:445
bool could_be_independent_p
Definition tree-data-ref.h:492
vec< loop_p > loop_nest
Definition tree-data-ref.h:448
struct data_reference * a
Definition tree-data-ref.h:419
struct data_reference * b
Definition tree-data-ref.h:420
tree are_dependent
Definition tree-data-ref.h:433
tree object_b
Definition tree-data-ref.h:440
bool affine_p
Definition tree-data-ref.h:461
bool self_reference_p
Definition tree-data-ref.h:465
tree object_a
Definition tree-data-ref.h:439
bool reversed_p
Definition tree-data-ref.h:457
vec< lambda_vector > dist_vects
Definition tree-data-ref.h:454
Definition tree-data-ref.h:151
tree ref
Definition tree-data-ref.h:156
struct dr_alias alias
Definition tree-data-ref.h:170
tree nowrap_bound
Definition tree-data-ref.h:177
void * aux
Definition tree-data-ref.h:159
struct indices alt_indices
Definition tree-data-ref.h:185
struct indices indices
Definition tree-data-ref.h:180
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:385
tree access_fn[2]
Definition tree-data-ref.h:387
tree distance
Definition tree-data-ref.h:402
conflict_function * conflicting_iterations_in_a
Definition tree-data-ref.h:391
tree last_conflict
Definition tree-data-ref.h:396
conflict_function * conflicting_iterations_in_b
Definition tree-data-ref.h:392
#define gcc_unreachable()
Definition system.h:799
#define MIN(X, Y)
Definition system.h:399
bool eq_evolutions_p(const_tree chrec0, const_tree chrec1)
Definition tree-chrec.cc:1766
void free_data_refs(vec< data_reference_p > &datarefs)
Definition tree-data-ref.cc:6466
int data_ref_compare_tree(tree t1, tree t2)
Definition tree-data-ref.cc:1619
bool find_loop_nest(class loop *loop, vec< loop_p > *loop_nest)
Definition tree-data-ref.cc:6347
struct data_dependence_relation * initialize_data_dependence_relation(struct data_dependence_relation *res, vec< loop_p > loop_nest, bool use_alt_indices)
Definition tree-data-ref.cc:3240
tree find_data_references_in_bb(class loop *loop, basic_block bb, vec< data_reference_p > *datarefs)
Definition tree-data-ref.cc:6161
bool compute_data_dependences_for_loop(class loop *loop, bool compute_self_and_read_read_dependences, vec< loop_p > *loop_nest, vec< data_reference_p > *datarefs, vec< ddr_p > *dependence_relations)
Definition tree-data-ref.cc:6363
bool dr_equal_offsets_p(struct data_reference *dra, struct data_reference *drb)
Definition tree-data-ref.cc:2788
bool graphite_find_data_references_in_stmt(edge nest, loop_p loop, gimple *stmt, vec< data_reference_p > *datarefs)
Definition tree-data-ref.cc:6135
DEBUG_FUNCTION void debug_data_references(vec< data_reference_p > datarefs)
Definition tree-data-ref.cc:201
DEBUG_FUNCTION void debug_data_reference(struct data_reference *dr)
Definition tree-data-ref.cc:209
bool dr_known_forward_stride_p(struct data_reference *dr)
Definition tree-data-ref.cc:6570
opt_result runtime_alias_check_p(ddr_p ddr, class loop *loop, bool speed_p)
Definition tree-data-ref.cc:1694
bool dr_may_alias_p(const struct data_reference *a, const struct data_reference *b, class loop *loop_nest)
Definition tree-data-ref.cc:3065
static void split_constant_offset(tree type, tree *var, tree *off, irange *result_range, hash_map< tree, std::pair< tree, tree > > &cache, unsigned *limit)
Definition tree-data-ref.cc:1021
tree find_data_references_in_loop(class loop *loop, vec< data_reference_p > *datarefs)
Definition tree-data-ref.cc:6191
tree dr_zero_step_indicator(struct data_reference *dr)
Definition tree-data-ref.cc:6561
DEBUG_FUNCTION void debug_data_dependence_relation(const struct data_dependence_relation *ddr)
Definition tree-data-ref.cc:484
DEBUG_FUNCTION void dump_data_dependence_relations(FILE *file, const vec< ddr_p > &ddrs)
Definition tree-data-ref.cc:492
struct data_reference * create_data_ref(edge nest, loop_p loop, tree memref, gimple *stmt, bool is_read, bool is_conditional_in_stmt, bool record_nowrap_assumptions)
Definition tree-data-ref.cc:1541
void free_dependence_relations(vec< ddr_p > &dependence_relations)
Definition tree-data-ref.cc:6454
void free_data_ref(data_reference_p dr)
Definition tree-data-ref.cc:1518
DEBUG_FUNCTION void debug_ddrs(vec< ddr_p > ddrs)
Definition tree-data-ref.cc:563
opt_result dr_analyze_innermost(innermost_loop_behavior *drb, tree ref, class loop *loop, const gimple *stmt, tree *nowrap_bound)
Definition tree-data-ref.cc:1138
void create_runtime_alias_checks(class loop *loop, const vec< dr_with_seg_len_pair_t > *alias_pairs, tree *cond_expr)
Definition tree-data-ref.cc:2732
void compute_affine_dependence(struct data_dependence_relation *ddr, class loop *loop_nest)
Definition tree-data-ref.cc:5798
void prune_runtime_alias_test_list(vec< dr_with_seg_len_pair_t > *alias_pairs, poly_uint64)
Definition tree-data-ref.cc:1867
void dump_data_reference(FILE *outf, struct data_reference *dr)
Definition tree-data-ref.cc:217
bool compute_all_dependences(const vec< data_reference_p > &datarefs, vec< ddr_p > *dependence_relations, const vec< loop_p > &loop_nest, bool compute_self_and_rr)
Definition tree-data-ref.cc:5863
bool loop_nest_has_data_refs(loop_p loop)
Definition tree-data-ref.cc:6072
void free_dependence_relation(struct data_dependence_relation *ddr)
Definition tree-data-ref.cc:6437
unsigned int dr_alignment(innermost_loop_behavior *drb)
Definition tree-data-ref.cc:6218
tree get_base_for_alignment(tree addr, unsigned int *max_alignment)
Definition tree-data-ref.cc:6301
tree dr_direction_indicator(struct data_reference *dr)
Definition tree-data-ref.cc:6553
opt_result find_data_references_in_stmt(class loop *nest, gimple *stmt, vec< data_reference_p > *datarefs, bool record_nowrap_assumptions)
Definition tree-data-ref.cc:6104
void dr_reset(data_reference *dr)
Definition tree-data-ref.cc:6476
DEBUG_FUNCTION void debug_data_dependence_relations(vec< ddr_p > ddrs)
Definition tree-data-ref.cc:517
#define DDR_DIST_VECT(DDR, I)
Definition tree-data-ref.h:521
#define DR_IS_WRITE(DR)
Definition tree-data-ref.h:196
bool lambda_vector_zerop(lambda_vector vec1, int size)
Definition tree-data-ref.h:775
lambda_vector * lambda_matrix
Definition tree-data-ref.h:146
bool lambda_vector_lexico_pos(lambda_vector v, unsigned n)
Definition tree-data-ref.h:756
lambda_vector lambda_vector_new(int size)
Definition tree-data-ref.h:738
#define DR_IS_READ(DR)
Definition tree-data-ref.h:195
bool known_dependences_p(vec< ddr_p > dependence_relations)
Definition tree-data-ref.h:636
#define DDR_DIST_VECTS(DDR)
Definition tree-data-ref.h:513
const unsigned int DR_ALIAS_UNSWAPPED
Definition tree-data-ref.h:305
const unsigned int DR_ALIAS_WAW
Definition tree-data-ref.h:302
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:747
const unsigned int DR_ALIAS_ARBITRARY
Definition tree-data-ref.h:303
struct subscript * subscript_p
Definition tree-data-ref.h:405
#define DDR_NB_LOOPS(DDR)
Definition tree-data-ref.h:510
lambda_matrix lambda_matrix_new(int m, int n, struct obstack *lambda_obstack)
Definition tree-data-ref.h:787
#define MAX_DIM
Definition tree-data-ref.h:360
#define DR_ACCESS_FN(DR, I)
Definition tree-data-ref.h:193
#define DR_REF(DR)
Definition tree-data-ref.h:189
const unsigned int DR_ALIAS_MIXED_STEPS
Definition tree-data-ref.h:306
unsigned dependence_level(lambda_vector dist_vect, int length)
Definition tree-data-ref.h:653
lambda_int lambda_vector_gcd(lambda_vector vector, int size)
Definition tree-data-ref.h:721
#define DR_BASE_OBJECT(DR)
Definition tree-data-ref.h:190
const unsigned int DR_ALIAS_RAW
Definition tree-data-ref.h:300
bool same_data_refs(data_reference_p a, data_reference_p b, int offset=0)
Definition tree-data-ref.h:615
int index_in_loop_nest(int var, const vec< loop_p > &loop_nest)
Definition tree-data-ref.h:684
bool same_data_refs_base_objects(data_reference_p a, data_reference_p b)
Definition tree-data-ref.h:604
struct data_dependence_relation * ddr_p
Definition tree-data-ref.h:495
#define DR_STEP(DR)
Definition tree-data-ref.h:201
unsigned ddr_dependence_level(ddr_p ddr)
Definition tree-data-ref.h:667
#define DDR_ARE_DEPENDENT(DDR)
Definition tree-data-ref.h:500
bool adjacent_dr_p(struct data_reference *dr)
Definition tree-data-ref.h:700
struct data_reference * data_reference_p
Definition tree-data-ref.h:210
data_dependence_direction
Definition tree-data-ref.h:343
@ dir_positive
Definition tree-data-ref.h:344
@ dir_positive_or_equal
Definition tree-data-ref.h:348
@ dir_star
Definition tree-data-ref.h:350
@ dir_negative
Definition tree-data-ref.h:345
@ dir_positive_or_negative
Definition tree-data-ref.h:347
@ dir_independent
Definition tree-data-ref.h:351
@ dir_negative_or_equal
Definition tree-data-ref.h:349
@ dir_equal
Definition tree-data-ref.h:346
#define DDR_NUM_DIST_VECTS(DDR)
Definition tree-data-ref.h:515
const unsigned int DR_ALIAS_WAR
Definition tree-data-ref.h:301
const unsigned int DR_ALIAS_SWAPPED
Definition tree-data-ref.h:304
HOST_WIDE_INT lambda_int
Definition tree-data-ref.h:141
vec< tree > affine_fn
Definition tree-data-ref.h:369
#define DR_NUM_DIMENSIONS(DR)
Definition tree-data-ref.h:194
#define DR_INNERMOST(DR)
Definition tree-data-ref.h:207
bool tree_int_cst_equal(const_tree t1, const_tree t2)
Definition tree.cc:6612
#define chrec_dont_know
Definition tree.h:4841
#define TREE_OPERAND(NODE, I)
Definition tree.h:1336
#define TYPE_SIZE_UNIT(NODE)
Definition tree.h:2443
#define TREE_CODE(NODE)
Definition tree.h:325
#define DECL_BIT_FIELD(NODE)
Definition tree.h:3258
#define TREE_TYPE(NODE)
Definition tree.h:513
#define FOR_EACH_VEC_ELT(V, I, P)
Definition vec.h:1895