summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-07 10:23:06 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-07 10:23:06 +0000
commit7bf606441c240250474b45d77c3a122e178349a0 (patch)
tree6bacff29f54b81215a23625852fb1d19f6ee22c7 /gcc/alias.c
parentdcbd396d210e2939c0a0d35f7598e01f9498e69f (diff)
downloadgcc-7bf606441c240250474b45d77c3a122e178349a0.tar.gz
* bitmap.c (bitmap_last_set_bit): Rewrite to return the correct bit.
* graphite.c (print_global_statistics): Use EDGE_COUNT instead of VEC_length. (print_graphite_scop_statistics): Likewise. * graphite-scop-detection.c (get_bb_type): Use single_succ_p. (print_graphite_scop_statistics): Use EDGE_COUNT, not VEC_length. (canonicalize_loop_closed_ssa): Use single_pred_p. * alias.c (reg_seen): Make this an sbitmap. (record_set, init_alias_analysis): Update. * tree-ssa-coalesce.c (ssa_conflicts_dump): Fix dumping. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191063 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index b7182074c5d..1df3529e942 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1220,7 +1220,7 @@ find_base_value (rtx src)
/* While scanning insns to find base values, reg_seen[N] is nonzero if
register N has been set in this function. */
-static char *reg_seen;
+static sbitmap reg_seen;
static void
record_set (rtx dest, const_rtx set, void *data ATTRIBUTE_UNUSED)
@@ -1246,7 +1246,7 @@ record_set (rtx dest, const_rtx set, void *data ATTRIBUTE_UNUSED)
{
while (--n >= 0)
{
- reg_seen[regno + n] = 1;
+ SET_BIT (reg_seen, regno + n);
new_reg_base_value[regno + n] = 0;
}
return;
@@ -1267,12 +1267,12 @@ record_set (rtx dest, const_rtx set, void *data ATTRIBUTE_UNUSED)
else
{
/* There's a REG_NOALIAS note against DEST. */
- if (reg_seen[regno])
+ if (TEST_BIT (reg_seen, regno))
{
new_reg_base_value[regno] = 0;
return;
}
- reg_seen[regno] = 1;
+ SET_BIT (reg_seen, regno);
new_reg_base_value[regno] = unique_base_value (unique_id++);
return;
}
@@ -1328,10 +1328,10 @@ record_set (rtx dest, const_rtx set, void *data ATTRIBUTE_UNUSED)
}
/* If this is the first set of a register, record the value. */
else if ((regno >= FIRST_PSEUDO_REGISTER || ! fixed_regs[regno])
- && ! reg_seen[regno] && new_reg_base_value[regno] == 0)
+ && ! TEST_BIT (reg_seen, regno) && new_reg_base_value[regno] == 0)
new_reg_base_value[regno] = find_base_value (src);
- reg_seen[regno] = 1;
+ SET_BIT (reg_seen, regno);
}
/* Return REG_BASE_VALUE for REGNO. Selective scheduler uses this to avoid
@@ -2789,7 +2789,7 @@ init_alias_analysis (void)
VEC_safe_grow_cleared (rtx, gc, reg_base_value, maxreg);
new_reg_base_value = XNEWVEC (rtx, maxreg);
- reg_seen = XNEWVEC (char, maxreg);
+ reg_seen = sbitmap_alloc (maxreg);
/* The basic idea is that each pass through this loop will use the
"constant" information from the previous pass to propagate alias
@@ -2834,7 +2834,7 @@ init_alias_analysis (void)
memset (new_reg_base_value, 0, maxreg * sizeof (rtx));
/* Wipe the reg_seen array clean. */
- memset (reg_seen, 0, maxreg);
+ sbitmap_zero (reg_seen);
/* Mark all hard registers which may contain an address.
The stack, frame and argument pointers may contain an address.
@@ -2957,7 +2957,7 @@ init_alias_analysis (void)
/* Clean up. */
free (new_reg_base_value);
new_reg_base_value = 0;
- free (reg_seen);
+ sbitmap_free (reg_seen);
reg_seen = 0;
timevar_pop (TV_ALIAS_ANALYSIS);
}