#include "target.h"
#include "rtl.h"
#include "basic-block.h"
-#include "diagnostic.h"
+#include "diagnostic-core.h"
#include "obstack.h"
#include "tree-flow.h"
#include "tree-dump.h"
{
tree iv, invar;
size_t i;
- for (i = 0; VEC_iterate (tree, outerinductionvars, i, iv); i++)
+ FOR_EACH_VEC_ELT (tree, outerinductionvars, i, iv)
if (iv != NULL)
{
if (SSA_NAME_VAR (iv) == SSA_NAME_VAR (expr))
LLE_DENOMINATOR (lle) = 1;
}
}
- for (i = 0; VEC_iterate (tree, invariants, i, invar); i++)
+ FOR_EACH_VEC_ELT (tree, invariants, i, invar)
if (invar != NULL)
{
if (SSA_NAME_VAR (invar) == SSA_NAME_VAR (expr))
ret = lambda_loopnest_new (depth, 2 * depth, lambda_obstack);
- for (i = 0; VEC_iterate (lambda_loop, loops, i, newloop); i++)
+ FOR_EACH_VEC_ELT (lambda_loop, loops, i, newloop)
LN_LOOPS (ret)[i] = newloop;
fail:
TRANSFORM is the matrix transform that was applied to OLD_LOOPNEST to get
NEW_LOOPNEST. */
-void
+void
lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest,
VEC(tree,heap) *old_ivs,
VEC(tree,heap) *invariants,
/* Rewrite uses of the old ivs so that they are now specified in terms of
the new ivs. */
- for (i = 0; VEC_iterate (tree, old_ivs, i, oldiv); i++)
+ FOR_EACH_VEC_ELT (tree, old_ivs, i, oldiv)
{
imm_use_iterator imm_iter;
use_operand_p use_p;
gsi_insert_before (firstbsi, setstmt, GSI_SAME_STMT);
update_stmt (setstmt);
SET_USE (use_p, var);
- h = GGC_NEW (struct tree_map);
+ h = ggc_alloc_tree_map ();
h->hash = in.hash;
h->base.from = use;
h->to = var;
distres = lambda_vector_new (nb_loops);
/* For each distance vector in the dependence graph. */
- for (i = 0; VEC_iterate (ddr_p, dependence_relations, i, ddr); i++)
+ FOR_EACH_VEC_ELT (ddr_p, dependence_relations, i, ddr)
{
/* Don't care about relations for which we know that there is no
dependence, nor about read-read (aka. output-dependences):
struct pointer_set_t *parameter_set = pointer_set_create ();
data_reference_p data_reference;
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, data_reference); i++)
+ FOR_EACH_VEC_ELT (data_reference_p, datarefs, i, data_reference)
for (j = 0; j < DR_NUM_DIMENSIONS (data_reference); j++)
lambda_collect_parameters_from_af (DR_ACCESS_FN (data_reference, j),
parameter_set, parameters);
data_reference_p dataref;
unsigned ix;
- for (ix = 0; VEC_iterate (data_reference_p, datarefs, ix, dataref); ix++)
+ FOR_EACH_VEC_ELT (data_reference_p, datarefs, ix, dataref)
if (!build_access_matrix (dataref, parameters, nest, lambda_obstack))
return false;