OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PR c/21213
[pf3gnuchains/gcc-fork.git]
/
gcc
/
df.c
diff --git
a/gcc/df.c
b/gcc/df.c
index
81ba0ea
..
ad7852c
100644
(file)
--- a/
gcc/df.c
+++ b/
gcc/df.c
@@
-1,5
+1,5
@@
/* Dataflow support routines.
/* Dataflow support routines.
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
, 2005
Free Software Foundation, Inc.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz,
mhayes@redhat.com)
Free Software Foundation, Inc.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz,
mhayes@redhat.com)
@@
-320,7
+320,7
@@
df_insn_table_realloc (struct df *df, unsigned int size)
if (! df->insns_modified)
{
if (! df->insns_modified)
{
- df->insns_modified = BITMAP_
XMALLOC (
);
+ df->insns_modified = BITMAP_
ALLOC (NULL
);
bitmap_zero (df->insns_modified);
}
}
bitmap_zero (df->insns_modified);
}
}
@@
-392,10
+392,10
@@
df_bitmaps_alloc (struct df *df, bitmap blocks, int flags)
if (!bb_info->rd_in)
{
/* Allocate bitmaps for reaching definitions. */
if (!bb_info->rd_in)
{
/* Allocate bitmaps for reaching definitions. */
- bb_info->rd_kill = BITMAP_
XMALLOC (
);
- bb_info->rd_gen = BITMAP_
XMALLOC (
);
- bb_info->rd_in = BITMAP_
XMALLOC (
);
- bb_info->rd_out = BITMAP_
XMALLOC (
);
+ bb_info->rd_kill = BITMAP_
ALLOC (NULL
);
+ bb_info->rd_gen = BITMAP_
ALLOC (NULL
);
+ bb_info->rd_in = BITMAP_
ALLOC (NULL
);
+ bb_info->rd_out = BITMAP_
ALLOC (NULL
);
}
else
{
}
else
{
@@
-411,10
+411,10
@@
df_bitmaps_alloc (struct df *df, bitmap blocks, int flags)
if (!bb_info->ru_in)
{
/* Allocate bitmaps for upward exposed uses. */
if (!bb_info->ru_in)
{
/* Allocate bitmaps for upward exposed uses. */
- bb_info->ru_kill = BITMAP_
XMALLOC (
);
- bb_info->ru_gen = BITMAP_
XMALLOC (
);
- bb_info->ru_in = BITMAP_
XMALLOC (
);
- bb_info->ru_out = BITMAP_
XMALLOC (
);
+ bb_info->ru_kill = BITMAP_
ALLOC (NULL
);
+ bb_info->ru_gen = BITMAP_
ALLOC (NULL
);
+ bb_info->ru_in = BITMAP_
ALLOC (NULL
);
+ bb_info->ru_out = BITMAP_
ALLOC (NULL
);
}
else
{
}
else
{
@@
-430,10
+430,10
@@
df_bitmaps_alloc (struct df *df, bitmap blocks, int flags)
if (!bb_info->lr_in)
{
/* Allocate bitmaps for live variables. */
if (!bb_info->lr_in)
{
/* Allocate bitmaps for live variables. */
- bb_info->lr_def = BITMAP_
XMALLOC (
);
- bb_info->lr_use = BITMAP_
XMALLOC (
);
- bb_info->lr_in = BITMAP_
XMALLOC (
);
- bb_info->lr_out = BITMAP_
XMALLOC (
);
+ bb_info->lr_def = BITMAP_
ALLOC (NULL
);
+ bb_info->lr_use = BITMAP_
ALLOC (NULL
);
+ bb_info->lr_in = BITMAP_
ALLOC (NULL
);
+ bb_info->lr_out = BITMAP_
ALLOC (NULL
);
}
else
{
}
else
{
@@
-463,39
+463,39
@@
df_bitmaps_free (struct df *df, int flags)
if ((flags & DF_RD) && bb_info->rd_in)
{
/* Free bitmaps for reaching definitions. */
if ((flags & DF_RD) && bb_info->rd_in)
{
/* Free bitmaps for reaching definitions. */
- BITMAP_
X
FREE (bb_info->rd_kill);
+ BITMAP_FREE (bb_info->rd_kill);
bb_info->rd_kill = NULL;
bb_info->rd_kill = NULL;
- BITMAP_
X
FREE (bb_info->rd_gen);
+ BITMAP_FREE (bb_info->rd_gen);
bb_info->rd_gen = NULL;
bb_info->rd_gen = NULL;
- BITMAP_
X
FREE (bb_info->rd_in);
+ BITMAP_FREE (bb_info->rd_in);
bb_info->rd_in = NULL;
bb_info->rd_in = NULL;
- BITMAP_
X
FREE (bb_info->rd_out);
+ BITMAP_FREE (bb_info->rd_out);
bb_info->rd_out = NULL;
}
if ((flags & DF_RU) && bb_info->ru_in)
{
/* Free bitmaps for upward exposed uses. */
bb_info->rd_out = NULL;
}
if ((flags & DF_RU) && bb_info->ru_in)
{
/* Free bitmaps for upward exposed uses. */
- BITMAP_
X
FREE (bb_info->ru_kill);
+ BITMAP_FREE (bb_info->ru_kill);
bb_info->ru_kill = NULL;
bb_info->ru_kill = NULL;
- BITMAP_
X
FREE (bb_info->ru_gen);
+ BITMAP_FREE (bb_info->ru_gen);
bb_info->ru_gen = NULL;
bb_info->ru_gen = NULL;
- BITMAP_
X
FREE (bb_info->ru_in);
+ BITMAP_FREE (bb_info->ru_in);
bb_info->ru_in = NULL;
bb_info->ru_in = NULL;
- BITMAP_
X
FREE (bb_info->ru_out);
+ BITMAP_FREE (bb_info->ru_out);
bb_info->ru_out = NULL;
}
if ((flags & DF_LR) && bb_info->lr_in)
{
/* Free bitmaps for live variables. */
bb_info->ru_out = NULL;
}
if ((flags & DF_LR) && bb_info->lr_in)
{
/* Free bitmaps for live variables. */
- BITMAP_
X
FREE (bb_info->lr_def);
+ BITMAP_FREE (bb_info->lr_def);
bb_info->lr_def = NULL;
bb_info->lr_def = NULL;
- BITMAP_
X
FREE (bb_info->lr_use);
+ BITMAP_FREE (bb_info->lr_use);
bb_info->lr_use = NULL;
bb_info->lr_use = NULL;
- BITMAP_
X
FREE (bb_info->lr_in);
+ BITMAP_FREE (bb_info->lr_in);
bb_info->lr_in = NULL;
bb_info->lr_in = NULL;
- BITMAP_
X
FREE (bb_info->lr_out);
+ BITMAP_FREE (bb_info->lr_out);
bb_info->lr_out = NULL;
}
}
bb_info->lr_out = NULL;
}
}
@@
-538,14
+538,14
@@
df_alloc (struct df *df, int n_regs)
df_reg_table_realloc (df, df->n_regs);
df_reg_table_realloc (df, df->n_regs);
- df->bbs_modified = BITMAP_
XMALLOC (
);
+ df->bbs_modified = BITMAP_
ALLOC (NULL
);
bitmap_zero (df->bbs_modified);
df->flags = 0;
df->bbs = xcalloc (last_basic_block, sizeof (struct bb_info));
bitmap_zero (df->bbs_modified);
df->flags = 0;
df->bbs = xcalloc (last_basic_block, sizeof (struct bb_info));
- df->all_blocks = BITMAP_
XMALLOC (
);
+ df->all_blocks = BITMAP_
ALLOC (NULL
);
FOR_EACH_BB (bb)
bitmap_set_bit (df->all_blocks, bb->index);
}
FOR_EACH_BB (bb)
bitmap_set_bit (df->all_blocks, bb->index);
}
@@
-583,13
+583,13
@@
df_free (struct df *df)
df->regs = 0;
df->reg_size = 0;
df->regs = 0;
df->reg_size = 0;
- BITMAP_
X
FREE (df->bbs_modified);
+ BITMAP_FREE (df->bbs_modified);
df->bbs_modified = 0;
df->bbs_modified = 0;
- BITMAP_
X
FREE (df->insns_modified);
+ BITMAP_FREE (df->insns_modified);
df->insns_modified = 0;
df->insns_modified = 0;
- BITMAP_
X
FREE (df->all_blocks);
+ BITMAP_FREE (df->all_blocks);
df->all_blocks = 0;
free_alloc_pool (df_ref_pool);
df->all_blocks = 0;
free_alloc_pool (df_ref_pool);
@@
-913,8
+913,7
@@
df_def_record_1 (struct df *df, rtx x, basic_block bb, rtx insn)
be handy for the reg allocator. */
while (GET_CODE (dst) == STRICT_LOW_PART
|| GET_CODE (dst) == ZERO_EXTRACT
be handy for the reg allocator. */
while (GET_CODE (dst) == STRICT_LOW_PART
|| GET_CODE (dst) == ZERO_EXTRACT
- || ((df->flags & DF_FOR_REGALLOC) == 0
- && read_modify_subreg_p (dst)))
+ || read_modify_subreg_p (dst))
{
/* Strict low part always contains SUBREG, but we do not want to make
it appear outside, as whole register is always considered. */
{
/* Strict low part always contains SUBREG, but we do not want to make
it appear outside, as whole register is always considered. */
@@
-1025,8
+1024,7
@@
df_uses_record (struct df *df, rtx *loc, enum df_ref_type ref_type,
switch (GET_CODE (dst))
{
case SUBREG:
switch (GET_CODE (dst))
{
case SUBREG:
- if ((df->flags & DF_FOR_REGALLOC) == 0
- && read_modify_subreg_p (dst))
+ if (read_modify_subreg_p (dst))
{
df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb,
insn, DF_REF_READ_WRITE);
{
df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb,
insn, DF_REF_READ_WRITE);
@@
-1198,7
+1196,7
@@
df_insn_refs_record (struct df *df, basic_block bb, rtx insn)
if (global_regs[i])
{
x = df_reg_use_gen (i);
if (global_regs[i])
{
x = df_reg_use_gen (i);
- df_uses_record (df, &
SET_DEST (x
),
+ df_uses_record (df, &
XEXP (x, 0
),
DF_REF_REG_USE, bb, insn, 0);
}
}
DF_REF_REG_USE, bb, insn, 0);
}
}
@@
-1486,14
+1484,14
@@
df_du_chain_create (struct df *df, bitmap blocks)
bitmap ru;
basic_block bb;
bitmap ru;
basic_block bb;
- ru = BITMAP_
XMALLOC (
);
+ ru = BITMAP_
ALLOC (NULL
);
FOR_EACH_BB_IN_BITMAP (blocks, 0, bb,
{
df_bb_du_chain_create (df, bb, ru);
});
FOR_EACH_BB_IN_BITMAP (blocks, 0, bb,
{
df_bb_du_chain_create (df, bb, ru);
});
- BITMAP_
X
FREE (ru);
+ BITMAP_FREE (ru);
}
}
@@
-1617,7
+1615,7
@@
df_bb_rd_local_compute (struct df *df, basic_block bb, bitmap call_killed_defs)
{
struct bb_info *bb_info = DF_BB_INFO (df, bb);
rtx insn;
{
struct bb_info *bb_info = DF_BB_INFO (df, bb);
rtx insn;
- bitmap seen = BITMAP_
XMALLOC (
);
+ bitmap seen = BITMAP_
ALLOC (NULL
);
bool call_seen = false;
FOR_BB_INSNS_REVERSE (bb, insn)
bool call_seen = false;
FOR_BB_INSNS_REVERSE (bb, insn)
@@
-1663,7
+1661,7
@@
df_bb_rd_local_compute (struct df *df, basic_block bb, bitmap call_killed_defs)
}
}
}
}
- BITMAP_
X
FREE (seen);
+ BITMAP_FREE (seen);
}
}
@@
-1678,7
+1676,7
@@
df_rd_local_compute (struct df *df, bitmap blocks)
if (df->flags & DF_HARD_REGS)
{
if (df->flags & DF_HARD_REGS)
{
- killed_by_call = BITMAP_
XMALLOC (
);
+ killed_by_call = BITMAP_
ALLOC (NULL
);
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
if (!TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
if (!TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
@@
-1697,7
+1695,7
@@
df_rd_local_compute (struct df *df, bitmap blocks)
});
if (df->flags & DF_HARD_REGS)
});
if (df->flags & DF_HARD_REGS)
- BITMAP_
X
FREE (killed_by_call);
+ BITMAP_FREE (killed_by_call);
}
}
@@
-1874,14
+1872,14
@@
df_reg_info_compute (struct df *df, bitmap blocks)
basic_block bb;
bitmap live;
basic_block bb;
bitmap live;
- live = BITMAP_
XMALLOC (
);
+ live = BITMAP_
ALLOC (NULL
);
FOR_EACH_BB_IN_BITMAP (blocks, 0, bb,
{
df_bb_reg_info_compute (df, bb, live);
});
FOR_EACH_BB_IN_BITMAP (blocks, 0, bb,
{
df_bb_reg_info_compute (df, bb, live);
});
- BITMAP_
X
FREE (live);
+ BITMAP_FREE (live);
}
}