summaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 26f1af4196a..ba1db90a996 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1162,18 +1162,17 @@ scan_function (void)
static const struct sra_walk_fns fns = {
scan_use, scan_copy, scan_init, scan_ldst, true
};
- bitmap_iterator bi;
sra_walk_function (&fns);
if (dump_file && (dump_flags & TDF_DETAILS))
{
- unsigned i;
+ referenced_var_iterator ri;
+ tree var;
fputs ("\nScan results:\n", dump_file);
- EXECUTE_IF_SET_IN_BITMAP (sra_candidates, 0, i, bi)
+ FOR_EACH_REFERENCED_VAR_IN_BITMAP (sra_candidates, var, ri)
{
- tree var = referenced_var (i);
struct sra_elt *elt = lookup_element (NULL, var, NULL, NO_INSERT);
if (elt)
scan_dump (elt);
@@ -1950,19 +1949,18 @@ decide_block_copy (struct sra_elt *elt)
static void
decide_instantiations (void)
{
- unsigned int i;
bool cleared_any;
bitmap_head done_head;
- bitmap_iterator bi;
+ referenced_var_iterator ri;
+ tree var;
/* We cannot clear bits from a bitmap we're iterating over,
so save up all the bits to clear until the end. */
bitmap_initialize (&done_head, &bitmap_default_obstack);
cleared_any = false;
- EXECUTE_IF_SET_IN_BITMAP (sra_candidates, 0, i, bi)
+ FOR_EACH_REFERENCED_VAR_IN_BITMAP (sra_candidates, var, ri)
{
- tree var = referenced_var (i);
struct sra_elt *elt = lookup_element (NULL, var, NULL, NO_INSERT);
if (elt)
{
@@ -1972,7 +1970,7 @@ decide_instantiations (void)
}
if (!elt)
{
- bitmap_set_bit (&done_head, i);
+ bitmap_set_bit (&done_head, DECL_UID (var));
cleared_any = true;
}
}
@@ -3532,12 +3530,11 @@ static void
scalarize_parms (void)
{
tree list = NULL;
- unsigned i;
- bitmap_iterator bi;
+ referenced_var_iterator ri;
+ tree var;
- EXECUTE_IF_SET_IN_BITMAP (needs_copy_in, 0, i, bi)
+ FOR_EACH_REFERENCED_VAR_IN_BITMAP (needs_copy_in, var, ri)
{
- tree var = referenced_var (i);
struct sra_elt *elt = lookup_element (NULL, var, NULL, NO_INSERT);
generate_copy_inout (elt, true, var, &list);
}