aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 4fab7b357df..66c04eecfa6 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1082,7 +1082,7 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
/* Create a worklist. Allocate an extra slot for ENTRY_BLOCK, and one
because the `head == tail' style test for an empty queue doesn't
work with a full queue. */
- queue = (basic_block *) xmalloc ((n_basic_blocks + 2) * sizeof (*queue));
+ queue = xmalloc ((n_basic_blocks + 2) * sizeof (*queue));
qtail = queue;
qhead = qend = queue + n_basic_blocks + 2;
@@ -1850,7 +1850,7 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
pbi->flags = flags;
if (flags & (PROP_LOG_LINKS | PROP_AUTOINC))
- pbi->reg_next_use = (rtx *) xcalloc (max_reg_num (), sizeof (rtx));
+ pbi->reg_next_use = xcalloc (max_reg_num (), sizeof (rtx));
else
pbi->reg_next_use = NULL;
@@ -1932,7 +1932,7 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
struct reg_cond_life_info *rcli;
rtx cond;
- rcli = (struct reg_cond_life_info *) xmalloc (sizeof (*rcli));
+ rcli = xmalloc (sizeof (*rcli));
if (REGNO_REG_SET_P (bb_true->global_live_at_start, i))
cond = cond_false;
@@ -1974,13 +1974,6 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
rtx mem = SET_DEST (set);
rtx canon_mem = canon_rtx (mem);
- /* This optimization is performed by faking a store to the
- memory at the end of the block. This doesn't work for
- unchanging memories because multiple stores to unchanging
- memory is illegal and alias analysis doesn't consider it. */
- if (RTX_UNCHANGING_P (canon_mem))
- continue;
-
if (XEXP (canon_mem, 0) == frame_pointer_rtx
|| (GET_CODE (XEXP (canon_mem, 0)) == PLUS
&& XEXP (XEXP (canon_mem, 0), 0) == frame_pointer_rtx
@@ -2152,7 +2145,7 @@ insn_dead_p (struct propagate_block_info *pbi, rtx x, int call_ok,
rtx_equal_p does not check the alias set or flags, we also
must have the potential for them to conflict (anti_dependence). */
for (temp = pbi->mem_set_list; temp != 0; temp = XEXP (temp, 1))
- if (anti_dependence (r, XEXP (temp, 0)))
+ if (unchanging_anti_dependence (r, XEXP (temp, 0)))
{
rtx mem = XEXP (temp, 0);
@@ -2867,7 +2860,7 @@ mark_regno_cond_dead (struct propagate_block_info *pbi, int regno, rtx cond)
/* The register was unconditionally live previously.
Record the current condition as the condition under
which it is dead. */
- rcli = (struct reg_cond_life_info *) xmalloc (sizeof (*rcli));
+ rcli = xmalloc (sizeof (*rcli));
rcli->condition = cond;
rcli->stores = cond;
rcli->orig_condition = const0_rtx;
@@ -3644,7 +3637,7 @@ mark_used_reg (struct propagate_block_info *pbi, rtx reg,
{
/* The register was not previously live at all. Record
the condition under which it is still dead. */
- rcli = (struct reg_cond_life_info *) xmalloc (sizeof (*rcli));
+ rcli = xmalloc (sizeof (*rcli));
rcli->condition = not_reg_cond (cond);
rcli->stores = const0_rtx;
rcli->orig_condition = const0_rtx;
@@ -3730,7 +3723,7 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn)
while (temp)
{
next = XEXP (temp, 1);
- if (anti_dependence (XEXP (temp, 0), x))
+ if (unchanging_anti_dependence (XEXP (temp, 0), x))
{
/* Splice temp out of the list. */
if (prev)