diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2007-01-26 20:33:04 +0100 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-01-26 19:33:04 +0000 |
commit | d93817c435983e82d29ca34a18c2e0e0781f9a7a (patch) | |
tree | 882484094ab53b168223d0aa692902de4af38b59 /gcc/tree-data-ref.h | |
parent | dfcb2b5145d2e16ccd171a2cf7b35b4103ef8977 (diff) | |
download | gcc-d93817c435983e82d29ca34a18c2e0e0781f9a7a.zip gcc-d93817c435983e82d29ca34a18c2e0e0781f9a7a.tar.gz gcc-d93817c435983e82d29ca34a18c2e0e0781f9a7a.tar.bz2 |
tree-data-ref.c (dump_subscript): Use dump_conflict_function.
* tree-data-ref.c (dump_subscript): Use dump_conflict_function.
(compute_subscript_distance, initialize_data_dependence_relation,
finalize_ddr_dependent, analyze_ziv_subscript,
analyze_siv_subscript_cst_affine,
compute_overlap_steps_for_affine_univar,
compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
analyze_siv_subscript, analyze_miv_subscript,
analyze_overlapping_iterations, subscript_dependence_tester_1,
compute_self_dependence, free_dependence_relation): Work
with affine_fn instead of chrecs.
(dump_affine_function, dump_conflict_function, affine_function_equal_p,
common_affine_function, affine_function_base,
affine_function_constant_p, affine_fn_op, affine_fn_plus,
affine_fn_minus, affine_fn_free, conflict_fn_not_known,
conflict_fn_no_dependence, free_conflict_function, free_subscripts,
conflict_fn, affine_fn_cst, affine_fn_univar): New functions.
(all_chrecs_equal_p): Removed.
* tree-data-ref.h (affine_fn, conflict_function): New types.
(struct subscript): Change type of conflicting_iterations_in_a
and conflicting_iterations_in_b.
From-SVN: r121212
Diffstat (limited to 'gcc/tree-data-ref.h')
-rw-r--r-- | gcc/tree-data-ref.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h index 8c6ee41..ba47174 100644 --- a/gcc/tree-data-ref.h +++ b/gcc/tree-data-ref.h @@ -190,6 +190,29 @@ enum data_dependence_direction { dir_independent }; +/* The description of the grid of iterations that overlap. At most + two loops are considered at the same time just now, hence at most + two functions are needed. For each of the functions, we store + the vector of coefficients, f[0] + x * f[1] + y * f[2] + ..., + where x, y, ... are variables. */ + +#define MAX_DIM 2 + +/* Special values of N. */ +#define NO_DEPENDENCE 0 +#define NOT_KNOWN (MAX_DIM + 1) +#define CF_NONTRIVIAL_P(CF) ((CF)->n != NO_DEPENDENCE && (CF)->n != NOT_KNOWN) +#define CF_NOT_KNOWN_P(CF) ((CF)->n == NOT_KNOWN) +#define CF_NO_DEPENDENCE_P(CF) ((CF)->n == NO_DEPENDENCE) + +typedef VEC (tree, heap) *affine_fn; + +typedef struct +{ + unsigned n; + affine_fn fns[MAX_DIM]; +} conflict_function; + /* What is a subscript? Given two array accesses a subscript is the tuple composed of the access functions for a given dimension. Example: Given A[f1][f2][f3] and B[g1][g2][g3], there are three @@ -201,8 +224,8 @@ struct subscript { /* A description of the iterations for which the elements are accessed twice. */ - tree conflicting_iterations_in_a; - tree conflicting_iterations_in_b; + conflict_function *conflicting_iterations_in_a; + conflict_function *conflicting_iterations_in_b; /* This field stores the information about the iteration domain validity of the dependence relation. */ |