diff options
author | Hans-Peter Nilsson <hp@bitrange.com> | 2002-04-18 22:11:39 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2002-04-18 22:11:39 +0000 |
commit | 566576e718cd3b186d65e3c61f06d502a8a18391 (patch) | |
tree | 2550711f6345c8adfdb0b74c4c8867c6f20bed66 /gcc/flow.c | |
parent | 0c7c67f076002dedbf8efd533e03e46c28c60ad4 (diff) | |
download | gcc-566576e718cd3b186d65e3c61f06d502a8a18391.tar.gz |
flow.c (update_life_info): Ignore return value of cleanup_cfg.
* flow.c (update_life_info): Ignore return value of cleanup_cfg.
Mask out PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE in
propagate_block calls after relaxation loop using new variable
stabilized_prop_flags.
From-SVN: r52498
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/flow.c b/gcc/flow.c index 627c28550fe..380c3d3421d 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -637,6 +637,7 @@ update_life_info (blocks, extent, prop_flags) regset tmp; regset_head tmp_head; int i; + int stabilized_prop_flags = prop_flags; tmp = INITIALIZE_REG_SET (tmp_head); ndead = 0; @@ -677,8 +678,21 @@ update_life_info (blocks, extent, prop_flags) | PROP_KILL_DEAD_CODE)); } - if (! changed || ! cleanup_cfg (CLEANUP_EXPENSIVE)) + /* Don't pass PROP_SCAN_DEAD_CODE or PROP_KILL_DEAD_CODE to + subsequent propagate_block calls, since removing or acting as + removing dead code can affect global register liveness, which + is supposed to be finalized for this call after this loop. */ + stabilized_prop_flags + &= ~(PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE); + + if (! changed) break; + + /* We repeat regardless of what cleanup_cfg says. If there were + instructions deleted above, that might have been only a + partial improvement (see MAX_MEM_SET_LIST_LEN usage). + Further improvement may be possible. */ + cleanup_cfg (CLEANUP_EXPENSIVE); } /* If asked, remove notes from the blocks we'll update. */ @@ -697,7 +711,7 @@ update_life_info (blocks, extent, prop_flags) basic_block bb = BASIC_BLOCK (i); COPY_REG_SET (tmp, bb->global_live_at_end); - propagate_block (bb, tmp, NULL, NULL, prop_flags); + propagate_block (bb, tmp, NULL, NULL, stabilized_prop_flags); if (extent == UPDATE_LIFE_LOCAL) verify_local_live_at_start (tmp, bb); @@ -710,7 +724,8 @@ update_life_info (blocks, extent, prop_flags) basic_block bb = BASIC_BLOCK (i); COPY_REG_SET (tmp, bb->global_live_at_end); - propagate_block (bb, tmp, NULL, NULL, prop_flags); + + propagate_block (bb, tmp, NULL, NULL, stabilized_prop_flags); if (extent == UPDATE_LIFE_LOCAL) verify_local_live_at_start (tmp, bb); |