#include "langhooks.h"
#include "pointer-set.h"
#include "hashtab.h"
-#include "toplev.h"
#include "flags.h"
#include "debug.h"
#include "target.h"
unsigned i;
tree var;
- for (i = 0; VEC_iterate (tree, n_var->new_vars, i, var); i++)
+ FOR_EACH_VEC_ELT (tree, n_var->new_vars, i, var)
finalize_var_creation (var);
return 1;
}
tree n_var;
unsigned i;
- for (i = 0; VEC_iterate (tree, var->new_vars, i, n_var); i++)
+ FOR_EACH_VEC_ELT (tree, var->new_vars, i, n_var)
{
tree type = strip_type(get_type_of_var (n_var));
gcc_assert (type);
alloc_site_t *call;
unsigned i;
- for (i = 0; VEC_iterate (alloc_site_t, fallocs->allocs, i, call); i++)
+ FOR_EACH_VEC_ELT (alloc_site_t, fallocs->allocs, i, call)
if (call->stmt == stmt
|| get_final_alloc_stmt (call->stmt) == stmt)
return true;
type = TYPE_MAIN_VARIANT (type);
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
if (is_equal_types (str->decl, type))
return i;
arg = integer_zerop (arg0) ? arg1 : arg0;
pos = integer_zerop (arg0) ? 1 : 0;
- for (i = 0; VEC_iterate (tree, str->new_types, i, type); i++)
+ FOR_EACH_VEC_ELT (tree, str->new_types, i, type)
{
tree new_arg;
gimple_set_vdef (new_stmt, NULL_TREE);
}
- for (i = 0; VEC_iterate (tree, acc->vars, i, var); i++)
+ FOR_EACH_VEC_ELT (tree, acc->vars, i, var)
{
tree new_var = find_new_var_of_type (var, new_type);
tree lhs, rhs = NULL_TREE;
gimple stmt = acc->stmt;
unsigned i;
- for (i = 0; VEC_iterate (tree, str->new_types, i, type); i++)
+ FOR_EACH_VEC_ELT (tree, str->new_types, i, type)
{
gimple new_stmt;
tree var;
unsigned i;
- for (i = 0; VEC_iterate (tree, n_var->new_vars, i, var); i++)
+ FOR_EACH_VEC_ELT (tree, n_var->new_vars, i, var)
insert_global_to_varpool (var);
return 1;
}
type = TYPE_MAIN_VARIANT (type);
- for (i = 0; VEC_iterate (tree, *unsuitable_types, i, t); i++)
+ FOR_EACH_VEC_ELT (tree, *unsuitable_types, i, t)
if (is_equal_types (t, type))
break;
print_gimple_stmt (dump_file, acc->stmt, 0, 0);
fprintf(dump_file, " : ");
- for (i = 0; VEC_iterate (tree, acc->vars, i, var); i++)
+ FOR_EACH_VEC_ELT (tree, acc->vars, i, var)
{
print_generic_expr (dump_file, var, 0);
fprintf(dump_file, ", ");
d_str str;
unsigned i;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
create_new_accs_for_struct (str, bb);
}
alloc_site_t *call;
unsigned j;
- for (j = 0; VEC_iterate (alloc_site_t, m_data->allocs, j, call); j++)
+ FOR_EACH_VEC_ELT (alloc_site_t, m_data->allocs, j, call)
{
gimple stmt = call->stmt;
d_str str = call->str;
}
/* Generate an allocation sites for each new structure type. */
- for (i = 0; VEC_iterate (tree, str->new_types, i, type); i++)
+ FOR_EACH_VEC_ELT (tree, str->new_types, i, type)
{
gimple new_malloc_stmt = NULL;
gimple last_stmt_tmp = NULL;
d_str str;
unsigned i;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
free_data_struct (str);
VEC_free (structure, heap, structures);
d_str str;
unsigned i;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
check_type_escape (str, unsuitable_types);
}
tree type;
unsigned i, j;
- for (j = 0; VEC_iterate (tree, unsuitable_types, j, type); j++)
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (tree, unsuitable_types, j, type)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
if (is_equal_types (str->decl, type))
{
remove_structure (i);
d_str str;
unsigned i;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
check_bitfields (str, unsuitable_types);
}
d_str str;
unsigned i;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
check_struct_form (str, unsuitable_types);
}
if (!dump_file)
return;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
dump_accs (str);
}
d_str str;
unsigned i;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
exclude_alloc_and_field_accs_1 (str, node);
}
fprintf (dump_file, "\nThe following are the new types generated by"
" this optimization:\n");
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
{
if (dump_file)
{
fprintf (dump_file, "\nthe number of new types is %d\n",
VEC_length (tree, str->new_types));
}
- for (j = 0; VEC_iterate (tree, str->new_types, j, type); j++)
+ FOR_EACH_VEC_ELT (tree, str->new_types, j, type)
dump_struct_type (type, 2, 0);
}
}
unsigned i;
int str_num = 0;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
create_new_type (str, &str_num);
}
d_str str;
/* We summarize counts of fields of a structure into the structure count. */
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
sum_counts (str, &hottest);
/* Remove cold structures from structures vector. */
d_str str;
unsigned i;
- for (i = 0; VEC_iterate (structure, structures, i, str); i++)
+ FOR_EACH_VEC_ELT (structure, structures, i, str)
peel_hot_fields (str);
}