Commit 6c875a31 by Jeff Law Committed by Jeff Law

tree-into-ssa.c (compute_global_livein): Use EXECUTE_IF_SET_IN_BITMAP rather…

tree-into-ssa.c (compute_global_livein): Use EXECUTE_IF_SET_IN_BITMAP rather than iterating through the blocks testing...

        * tree-into-ssa.c (compute_global_livein): Use EXECUTE_IF_SET_IN_BITMAP
        rather than iterating through the blocks testing each bit in
        livein to initialize the worklist.
        (mark_def_sites): Remove useless checks of KILLS for virtual
        operands.

From-SVN: r81811
parent 0e7b565c
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
2004-05-13 Jeff Law <law@redhat.com> 2004-05-13 Jeff Law <law@redhat.com>
* tree-into-ssa.c (compute_global_livein): Use EXECUTE_IF_SET_IN_BITMAP
rather than iterating through the blocks testing each bit in
livein to initialize the worklist.
(mark_def_sites): Remove useless checks of KILLS for virtual
operands.
* tree-ssa-forwprop.c (record_single_argument_cond_exprs): Accept * tree-ssa-forwprop.c (record_single_argument_cond_exprs): Accept
new parameters for the statement and variable worklist as well new parameters for the statement and variable worklist as well
as a bitmap of interesting SSA_NAMEs. Walk over the statement as a bitmap of interesting SSA_NAMEs. Walk over the statement
......
...@@ -136,16 +136,15 @@ static void ...@@ -136,16 +136,15 @@ static void
compute_global_livein (bitmap livein, bitmap def_blocks) compute_global_livein (bitmap livein, bitmap def_blocks)
{ {
basic_block bb, *worklist, *tos; basic_block bb, *worklist, *tos;
int i;
tos = worklist tos = worklist
= (basic_block *) xmalloc (sizeof (basic_block) * (last_basic_block + 1)); = (basic_block *) xmalloc (sizeof (basic_block) * (last_basic_block + 1));
/* Initialize the worklist. */ EXECUTE_IF_SET_IN_BITMAP (livein, 0, i,
FOR_EACH_BB (bb)
{ {
if (bitmap_bit_p (livein, bb->index)) *tos++ = BASIC_BLOCK (i);
*tos++ = bb; });
}
/* Iterate until the worklist is empty. */ /* Iterate until the worklist is empty. */
while (tos != worklist) while (tos != worklist)
...@@ -244,8 +243,7 @@ mark_def_sites (struct dom_walk_data *walk_data, ...@@ -244,8 +243,7 @@ mark_def_sites (struct dom_walk_data *walk_data,
{ {
tree *use_p = VUSE_OP_PTR (vuses, i); tree *use_p = VUSE_OP_PTR (vuses, i);
if (prepare_operand_for_rename (use_p, &uid) if (prepare_operand_for_rename (use_p, &uid))
&& !TEST_BIT (kills, uid))
set_livein_block (*use_p, bb); set_livein_block (*use_p, bb);
} }
...@@ -264,7 +262,6 @@ mark_def_sites (struct dom_walk_data *walk_data, ...@@ -264,7 +262,6 @@ mark_def_sites (struct dom_walk_data *walk_data,
{ {
VDEF_RESULT (vdefs, i) = VDEF_OP (vdefs, i); VDEF_RESULT (vdefs, i) = VDEF_OP (vdefs, i);
if (!TEST_BIT (kills, uid))
set_livein_block (VDEF_OP (vdefs, i), bb); set_livein_block (VDEF_OP (vdefs, i), bb);
set_def_block (VDEF_RESULT (vdefs, i), bb); set_def_block (VDEF_RESULT (vdefs, i), bb);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment