diff options
author | Richard Biener <rguenther@suse.de> | 2015-03-18 13:36:16 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-03-18 13:36:16 +0000 |
commit | 6f4f1a507979b0a6839ccea1d34b8ee1dc83b18e (patch) | |
tree | 091a9feb8f0e17a8170200bbf6bbfcb780215153 /gcc | |
parent | 9538c95bb185a04a86a993c4332b7f19aca95f1e (diff) | |
download | gcc-6f4f1a507979b0a6839ccea1d34b8ee1dc83b18e.zip gcc-6f4f1a507979b0a6839ccea1d34b8ee1dc83b18e.tar.gz gcc-6f4f1a507979b0a6839ccea1d34b8ee1dc83b18e.tar.bz2 |
tree-data-ref.h (struct access_matrix): Remove.
2015-03-18 Richard Biener <rguenther@suse.de>
* tree-data-ref.h (struct access_matrix): Remove.
(AM_LOOP_NEST, AM_NB_INDUCTION_VARS, AM_PARAMETERS, AM_MATRIX,
AM_NB_PARAMETERS, AM_CONST_COLUMN_INDEX, AM_NB_COLUMNS,
AM_GET_SUBSCRIPT_ACCESS_VECTOR, AM_GET_ACCESS_MATRIX_ELEMENT): Likewise.
(am_vector_index_for_loop): Likewise.
(struct data_reference): Remove access_matrix member.
(DR_ACCESS_MATRIX): Remove.
(lambda_vector_new): Add comment.
(lambda_matrix_new): Use XOBNEWVEC.
From-SVN: r221488
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/tree-data-ref.h | 69 |
2 files changed, 15 insertions, 66 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0b27dc2..2399f18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,17 @@ 2015-03-18 Richard Biener <rguenther@suse.de> + * tree-data-ref.h (struct access_matrix): Remove. + (AM_LOOP_NEST, AM_NB_INDUCTION_VARS, AM_PARAMETERS, AM_MATRIX, + AM_NB_PARAMETERS, AM_CONST_COLUMN_INDEX, AM_NB_COLUMNS, + AM_GET_SUBSCRIPT_ACCESS_VECTOR, AM_GET_ACCESS_MATRIX_ELEMENT): Likewise. + (am_vector_index_for_loop): Likewise. + (struct data_reference): Remove access_matrix member. + (DR_ACCESS_MATRIX): Remove. + (lambda_vector_new): Add comment. + (lambda_matrix_new): Use XOBNEWVEC. + +2015-03-18 Richard Biener <rguenther@suse.de> + * tree-ssa-loop-ch.c (pass_data_ch): Remove TODO_cleanup_cfg. (pass_ch::execute): Cleanup the CFG only if we did sth. * tree-vect-generic.c (pass_data_lower_vector): Remove TODO_cleanup_cfg. diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h index 3c45690..edb3b56 100644 --- a/gcc/tree-data-ref.h +++ b/gcc/tree-data-ref.h @@ -100,66 +100,7 @@ typedef int *lambda_vector; all vectors are the same length). */ typedef lambda_vector *lambda_matrix; -/* Each vector of the access matrix represents a linear access - function for a subscript. First elements correspond to the - leftmost indices, ie. for a[i][j] the first vector corresponds to - the subscript in "i". The elements of a vector are relative to - the loop nests in which the data reference is considered, - i.e. the vector is relative to the SCoP that provides the context - in which this data reference occurs. - For example, in - - | loop_1 - | loop_2 - | a[i+3][2*j+n-1] - - if "i" varies in loop_1 and "j" varies in loop_2, the access - matrix with respect to the loop nest {loop_1, loop_2} is: - - | loop_1 loop_2 param_n cst - | 1 0 0 3 - | 0 2 1 -1 - - whereas the access matrix with respect to loop_2 considers "i" as - a parameter: - - | loop_2 param_i param_n cst - | 0 1 0 3 - | 2 0 1 -1 -*/ -struct access_matrix -{ - vec<loop_p> loop_nest; - int nb_induction_vars; - vec<tree> parameters; - vec<lambda_vector, va_gc> *matrix; -}; - -#define AM_LOOP_NEST(M) (M)->loop_nest -#define AM_NB_INDUCTION_VARS(M) (M)->nb_induction_vars -#define AM_PARAMETERS(M) (M)->parameters -#define AM_MATRIX(M) (M)->matrix -#define AM_NB_PARAMETERS(M) (AM_PARAMETERS (M)).length () -#define AM_CONST_COLUMN_INDEX(M) (AM_NB_INDUCTION_VARS (M) + AM_NB_PARAMETERS (M)) -#define AM_NB_COLUMNS(M) (AM_NB_INDUCTION_VARS (M) + AM_NB_PARAMETERS (M) + 1) -#define AM_GET_SUBSCRIPT_ACCESS_VECTOR(M, I) AM_MATRIX (M)[I] -#define AM_GET_ACCESS_MATRIX_ELEMENT(M, I, J) AM_GET_SUBSCRIPT_ACCESS_VECTOR (M, I)[J] - -/* Return the column in the access matrix of LOOP_NUM. */ - -static inline int -am_vector_index_for_loop (struct access_matrix *access_matrix, int loop_num) -{ - int i; - loop_p l; - - for (i = 0; AM_LOOP_NEST (access_matrix).iterate (i, &l); i++) - if (l->num == loop_num) - return i; - - gcc_unreachable (); -} struct data_reference { @@ -183,9 +124,6 @@ struct data_reference /* Alias information for the data reference. */ struct dr_alias alias; - - /* Matrix representation for the data access functions. */ - struct access_matrix *access_matrix; }; #define DR_STMT(DR) (DR)->stmt @@ -202,7 +140,6 @@ struct data_reference #define DR_STEP(DR) (DR)->innermost.step #define DR_PTR_INFO(DR) (DR)->alias.ptr_info #define DR_ALIGNED_TO(DR) (DR)->innermost.aligned_to -#define DR_ACCESS_MATRIX(DR) (DR)->access_matrix typedef struct data_reference *data_reference_p; @@ -560,6 +497,7 @@ lambda_vector_gcd (lambda_vector vector, int size) static inline lambda_vector lambda_vector_new (int size) { + /* ??? We shouldn't abuse the GC allocator here. */ return ggc_cleared_vec_alloc<int> (size); } @@ -611,11 +549,10 @@ lambda_matrix_new (int m, int n, struct obstack *lambda_obstack) lambda_matrix mat; int i; - mat = (lambda_matrix) obstack_alloc (lambda_obstack, - sizeof (lambda_vector *) * m); + mat = XOBNEWVEC (lambda_obstack, lambda_vector, m); for (i = 0; i < m; i++) - mat[i] = lambda_vector_new (n); + mat[i] = XOBNEWVEC (lambda_obstack, int, n); return mat; } |