Commit e16d045d by Richard Henderson Committed by Richard Henderson

ifcvt.c (life_data_ok): New.

        * ifcvt.c (life_data_ok): New.
        (merge_if_block): Use it to determine whether to update
        global_live_at_end.
        (if_convert): Set it.

From-SVN: r43170
parent 68fe6226
2001-06-10 Richard Henderson <rth@redhat.com> 2001-06-10 Richard Henderson <rth@redhat.com>
* ifcvt.c (life_data_ok): New.
(merge_if_block): Use it to determine whether to update
global_live_at_end.
(if_convert): Set it.
2001-06-10 Richard Henderson <rth@redhat.com>
* config/alpha/osf5.h (ASM_OLDAS_SPEC): Add -c. * config/alpha/osf5.h (ASM_OLDAS_SPEC): Add -c.
2001-06-10 Alexandre Oliva <aoliva@redhat.com> 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
......
...@@ -66,6 +66,9 @@ static int num_updated_if_blocks; ...@@ -66,6 +66,9 @@ static int num_updated_if_blocks;
/* # of basic blocks that were removed. */ /* # of basic blocks that were removed. */
static int num_removed_blocks; static int num_removed_blocks;
/* True if life data ok at present. */
static bool life_data_ok;
/* The post-dominator relation on the original block numbers. */ /* The post-dominator relation on the original block numbers. */
static sbitmap *post_dominators; static sbitmap *post_dominators;
...@@ -1719,7 +1722,7 @@ merge_if_block (test_bb, then_bb, else_bb, join_bb) ...@@ -1719,7 +1722,7 @@ merge_if_block (test_bb, then_bb, else_bb, join_bb)
/* First merge TEST block into THEN block. This is a no-brainer since /* First merge TEST block into THEN block. This is a no-brainer since
the THEN block did not have a code label to begin with. */ the THEN block did not have a code label to begin with. */
if (combo_bb->global_live_at_end) if (life_data_ok)
COPY_REG_SET (combo_bb->global_live_at_end, then_bb->global_live_at_end); COPY_REG_SET (combo_bb->global_live_at_end, then_bb->global_live_at_end);
merge_blocks_nomove (combo_bb, then_bb); merge_blocks_nomove (combo_bb, then_bb);
num_removed_blocks++; num_removed_blocks++;
...@@ -1759,7 +1762,7 @@ merge_if_block (test_bb, then_bb, else_bb, join_bb) ...@@ -1759,7 +1762,7 @@ merge_if_block (test_bb, then_bb, else_bb, join_bb)
else if (join_bb->pred == NULL || join_bb->pred->pred_next == NULL) else if (join_bb->pred == NULL || join_bb->pred->pred_next == NULL)
{ {
/* We can merge the JOIN. */ /* We can merge the JOIN. */
if (combo_bb->global_live_at_end) if (life_data_ok)
COPY_REG_SET (combo_bb->global_live_at_end, COPY_REG_SET (combo_bb->global_live_at_end,
join_bb->global_live_at_end); join_bb->global_live_at_end);
merge_blocks_nomove (combo_bb, join_bb); merge_blocks_nomove (combo_bb, join_bb);
...@@ -2444,14 +2447,15 @@ dead_or_predicable (test_bb, merge_bb, other_bb, new_dest, reversep) ...@@ -2444,14 +2447,15 @@ dead_or_predicable (test_bb, merge_bb, other_bb, new_dest, reversep)
/* Main entry point for all if-conversion. */ /* Main entry point for all if-conversion. */
void void
if_convert (life_data_ok) if_convert (x_life_data_ok)
int life_data_ok; int x_life_data_ok;
{ {
int block_num; int block_num;
num_possible_if_blocks = 0; num_possible_if_blocks = 0;
num_updated_if_blocks = 0; num_updated_if_blocks = 0;
num_removed_blocks = 0; num_removed_blocks = 0;
life_data_ok = (x_life_data_ok != 0);
/* Free up basic_block_for_insn so that we don't have to keep it /* Free up basic_block_for_insn so that we don't have to keep it
up to date, either here or in merge_blocks_nomove. */ up to date, either here or in merge_blocks_nomove. */
......
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