This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix stepanov life patch regressions
- To: gcc-patches at gcc dot gnu dot org
- Subject: fix stepanov life patch regressions
- From: Richard Henderson <rth at redhat dot com>
- Date: Sun, 10 Jun 2001 22:19:34 -0700
Fixes
FAIL: gcc.c-torture/execute/930614-2.c compilation, -O3 -fomit-frame-pointer -funroll-loops
FAIL: gcc.c-torture/execute/930614-2.c compilation, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions
FAIL: gcc.c-torture/execute/991023-1.c compilation, -O3 -fomit-frame-pointer -funroll-loops
FAIL: gcc.c-torture/execute/991023-1.c compilation, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions
FAIL: gcc.misc-tests/mg.c
We've got leftovers of life analysis hanging about, which could
cause us to get confused about whether or not we were supposed
to be using it. Be more explicit about the whole thing.
Applied mainline and branch.
r~
* ifcvt.c (life_data_ok): New.
(merge_if_block): Use it to determine whether to update
global_live_at_end.
(if_convert): Set it.
Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.37.4.4
diff -c -p -d -r1.37.4.4 ifcvt.c
*** ifcvt.c 2001/05/13 07:09:55 1.37.4.4
--- ifcvt.c 2001/06/11 05:12:43
*************** static int num_updated_if_blocks;
*** 64,69 ****
--- 64,72 ----
/* # of basic blocks that were removed. */
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. */
static sbitmap *post_dominators;
*************** merge_if_block (test_bb, then_bb, else_b
*** 1396,1402 ****
/* 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. */
! if (combo_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);
num_removed_blocks++;
--- 1399,1405 ----
/* 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. */
! if (life_data_ok)
COPY_REG_SET (combo_bb->global_live_at_end, then_bb->global_live_at_end);
merge_blocks_nomove (combo_bb, then_bb);
num_removed_blocks++;
*************** merge_if_block (test_bb, then_bb, else_b
*** 1436,1442 ****
else if (join_bb->pred == NULL || join_bb->pred->pred_next == NULL)
{
/* We can merge the JOIN. */
! if (combo_bb->global_live_at_end)
COPY_REG_SET (combo_bb->global_live_at_end,
join_bb->global_live_at_end);
merge_blocks_nomove (combo_bb, join_bb);
--- 1439,1445 ----
else if (join_bb->pred == NULL || join_bb->pred->pred_next == NULL)
{
/* We can merge the JOIN. */
! if (life_data_ok)
COPY_REG_SET (combo_bb->global_live_at_end,
join_bb->global_live_at_end);
merge_blocks_nomove (combo_bb, join_bb);
*************** dead_or_predicable (test_bb, merge_bb, o
*** 2125,2138 ****
/* Main entry point for all if-conversion. */
void
! if_convert (life_data_ok)
! int life_data_ok;
{
int block_num;
num_possible_if_blocks = 0;
num_updated_if_blocks = 0;
num_removed_blocks = 0;
/* 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. */
--- 2128,2142 ----
/* Main entry point for all if-conversion. */
void
! if_convert (x_life_data_ok)
! int x_life_data_ok;
{
int block_num;
num_possible_if_blocks = 0;
num_updated_if_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
up to date, either here or in merge_blocks_nomove. */