diff options
author | Thomas Neumann <tneumann@users.sourceforge.net> | 2007-06-06 14:33:57 +0000 |
---|---|---|
committer | Thomas Neumann <tneumann@gcc.gnu.org> | 2007-06-06 14:33:57 +0000 |
commit | 45222d4a3d07fc721de24bcb6c264dcd0541150a (patch) | |
tree | b80fec3949a169acee5421cfa7637d4c4eec7242 | |
parent | 68c834d087355b52387e37a5c87436153b638b05 (diff) | |
download | gcc-45222d4a3d07fc721de24bcb6c264dcd0541150a.zip gcc-45222d4a3d07fc721de24bcb6c264dcd0541150a.tar.gz gcc-45222d4a3d07fc721de24bcb6c264dcd0541150a.tar.bz2 |
lambda-code.c (struct lambda_lattice_s): Add a name to the struct.
* lambda-code.c (struct lambda_lattice_s): Add a name to the struct.
(lambda_body_vector_new): Use type safe memory macros.
(lambda_linear_expression_new): Likewise.
(lambda_loopnest_new): Likewise.
(lambda_lattice_new): Likewise.
(replace_uses_equiv_to_x_with_y): Cast according to the coding
conventions. Use type safe memory macros.
* lambda.h (struct lambda_trans_matrix_s): Add a name to the struct.
(lambda_body_vector_s): Likewise.
* lambda-mat.c (lambda_matrix_new): Use type safe memory macros.
* lambda-trans.c (lambda_trans_matrix_new): Likewise.
From-SVN: r125491
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/lambda-code.c | 16 | ||||
-rw-r--r-- | gcc/lambda-mat.c | 2 | ||||
-rw-r--r-- | gcc/lambda-trans.c | 2 | ||||
-rw-r--r-- | gcc/lambda.h | 6 |
5 files changed, 27 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2daf37..0d19d01 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2007-06-06 Thomas Neumann <tneumann@users.sourceforge.net> + + * lambda-code.c (struct lambda_lattice_s): Add a name to the struct. + (lambda_body_vector_new): Use type safe memory macros. + (lambda_linear_expression_new): Likewise. + (lambda_loopnest_new): Likewise. + (lambda_lattice_new): Likewise. + (replace_uses_equiv_to_x_with_y): Cast according to the coding + conventions. Use type safe memory macros. + * lambda.h (struct lambda_trans_matrix_s): Add a name to the struct. + (lambda_body_vector_s): Likewise. + * lambda-mat.c (lambda_matrix_new): Use type safe memory macros. + * lambda-trans.c (lambda_trans_matrix_new): Likewise. + 2007-06-06 Richard Guenther <rguenther@suse.de> * tree-ssa-forwprop.c (forward_propagate_into_cond): Return 2 diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c index 96aaaa0..501079f 100644 --- a/gcc/lambda-code.c +++ b/gcc/lambda-code.c @@ -120,7 +120,7 @@ static bool perfect_nestify (struct loop *, VEC(tree,heap) *, VEC(tree,heap) *); /* Lattice stuff that is internal to the code generation algorithm. */ -typedef struct +typedef struct lambda_lattice_s { /* Lattice base matrix. */ lambda_matrix base; @@ -155,7 +155,7 @@ lambda_body_vector_new (int size) { lambda_body_vector ret; - ret = ggc_alloc (sizeof (*ret)); + ret = GGC_NEW (struct lambda_body_vector_s); LBV_COEFFICIENTS (ret) = lambda_vector_new (size); LBV_SIZE (ret) = size; LBV_DENOMINATOR (ret) = 1; @@ -227,7 +227,7 @@ lambda_linear_expression_new (int dim, int invariants) { lambda_linear_expression ret; - ret = ggc_alloc_cleared (sizeof (*ret)); + ret = GGC_CNEW (struct lambda_linear_expression_s); LLE_COEFFICIENTS (ret) = lambda_vector_new (dim); LLE_CONSTANT (ret) = 0; @@ -328,9 +328,9 @@ lambda_loopnest lambda_loopnest_new (int depth, int invariants) { lambda_loopnest ret; - ret = ggc_alloc (sizeof (*ret)); + ret = GGC_NEW (struct lambda_loopnest_s); - LN_LOOPS (ret) = ggc_alloc_cleared (depth * sizeof (lambda_loop)); + LN_LOOPS (ret) = GGC_CNEWVEC (lambda_loop, depth); LN_DEPTH (ret) = depth; LN_INVARIANTS (ret) = invariants; @@ -360,7 +360,7 @@ static lambda_lattice lambda_lattice_new (int depth, int invariants) { lambda_lattice ret; - ret = ggc_alloc (sizeof (*ret)); + ret = GGC_NEW (struct lambda_lattice_s); LATTICE_BASE (ret) = lambda_matrix_new (depth, depth); LATTICE_ORIGIN (ret) = lambda_vector_new (depth); LATTICE_ORIGIN_INVARIANTS (ret) = lambda_matrix_new (depth, invariants); @@ -1981,7 +1981,7 @@ replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x, temporaries. */ in.hash = htab_hash_pointer (use); in.base.from = use; - h = htab_find_with_hash (replacements, &in, in.hash); + h = (struct tree_map *) htab_find_with_hash (replacements, &in, in.hash); if (h != NULL) { SET_USE (use_p, h->to); @@ -2023,7 +2023,7 @@ replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x, bsi_insert_before (firstbsi, setstmt, BSI_SAME_STMT); update_stmt (setstmt); SET_USE (use_p, var); - h = ggc_alloc (sizeof (struct tree_map)); + h = GGC_NEW (struct tree_map); h->hash = in.hash; h->base.from = use; h->to = var; diff --git a/gcc/lambda-mat.c b/gcc/lambda-mat.c index 39b75e6..bd383bc 100644 --- a/gcc/lambda-mat.c +++ b/gcc/lambda-mat.c @@ -37,7 +37,7 @@ lambda_matrix_new (int m, int n) lambda_matrix mat; int i; - mat = ggc_alloc (m * sizeof (lambda_vector)); + mat = GGC_NEWVEC (lambda_vector, m); for (i = 0; i < m; i++) mat[i] = lambda_vector_new (n); diff --git a/gcc/lambda-trans.c b/gcc/lambda-trans.c index aff2f1d..fbd8304 100644 --- a/gcc/lambda-trans.c +++ b/gcc/lambda-trans.c @@ -35,7 +35,7 @@ lambda_trans_matrix_new (int colsize, int rowsize) { lambda_trans_matrix ret; - ret = ggc_alloc (sizeof (*ret)); + ret = GGC_NEW (struct lambda_trans_matrix_s); LTM_MATRIX (ret) = lambda_matrix_new (rowsize, colsize); LTM_ROWSIZE (ret) = rowsize; LTM_COLSIZE (ret) = colsize; diff --git a/gcc/lambda.h b/gcc/lambda.h index e6fbc8f..9310b84 100644 --- a/gcc/lambda.h +++ b/gcc/lambda.h @@ -40,7 +40,7 @@ typedef lambda_vector *lambda_matrix; /* A transformation matrix, which is a self-contained ROWSIZE x COLSIZE matrix. Rather than use floats, we simply keep a single DENOMINATOR that represents the denominator for every element in the matrix. */ -typedef struct +typedef struct lambda_trans_matrix_s { lambda_matrix matrix; int rowsize; @@ -61,7 +61,7 @@ typedef struct This structure is used during code generation in order to rewrite the old induction variable uses in a statement in terms of the newly created induction variables. */ -typedef struct +typedef struct lambda_body_vector_s { lambda_vector coefficients; int size; @@ -127,7 +127,7 @@ typedef struct lambda_loop_s and an integer representing the number of INVARIANTS in the loop. Both of these integers are used to size the associated coefficient vectors in the linear expression structures. */ -typedef struct +typedef struct lambda_loopnest_s { lambda_loop *loops; int depth; |