(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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125491
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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;
{
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;
{
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;
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;
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);
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);
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;
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);
{
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;
/* 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;
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;
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;