basic-block.h (PEOP_SCAN_DEAD_STORES): New.

* basic-block.h (PEOP_SCAN_DEAD_STORES): New.
	(PROP_FINAL): Include.
	* flow.c (life_analysis, update_life_info,
	init_propagate_block_info, mark_set_1, mark_used_rgs):
	Support SCAN_DEAD_STORE.

From-SVN: r53920
This commit is contained in:
Jan Hubicka 2002-05-27 12:15:57 +02:00 committed by Jan Hubicka
parent c9715013ff
commit 5149f0701c
3 changed files with 23 additions and 7 deletions

View File

@ -1,3 +1,11 @@
Mon May 27 12:14:02 CEST 2002 Jan Hubicka <jh@suse.cz>
* basic-block.h (PEOP_SCAN_DEAD_STORES): New.
(PROP_FINAL): Include.
* flow.c (life_analysis, update_life_info,
init_propagate_block_info, mark_set_1, mark_used_rgs):
Support SCAN_DEAD_STORE.
2002-05-27 Neil Booth <neil@daikokuya.demon.co.uk>
* c-common.c (c_common_init): Set CPP arithmetic precision.

View File

@ -582,7 +582,12 @@ enum update_life_extent
by dead code removal. */
#define PROP_AUTOINC 64 /* Create autoinc mem references. */
#define PROP_EQUAL_NOTES 128 /* Take into account REG_EQUAL notes. */
#define PROP_FINAL 127 /* All of the above. */
#define PROP_SCAN_DEAD_STORES 256 /* Scan for dead code. */
#define PROP_FINAL (PROP_DEATH_NOTES | PROP_LOG_LINKS \
| PROP_REG_INFO | PROP_KILL_DEAD_CODE \
| PROP_SCAN_DEAD_CODE | PROP_AUTOINC \
| PROP_ALLOW_CFG_CHANGES \
| PROP_SCAN_DEAD_STORES)
#define CLEANUP_EXPENSIVE 1 /* Do relativly expensive optimizations
except for edge forwarding */

View File

@ -447,7 +447,7 @@ life_analysis (f, file, flags)
flags &= ~(PROP_REG_INFO | PROP_AUTOINC);
/* We want alias analysis information for local dead store elimination. */
if (optimize && (flags & PROP_SCAN_DEAD_CODE))
if (optimize && (flags & PROP_SCAN_DEAD_STORES))
init_alias_analysis ();
/* Always remove no-op moves. Do this before other processing so
@ -477,7 +477,7 @@ life_analysis (f, file, flags)
update_life_info (NULL, UPDATE_LIFE_GLOBAL, flags);
/* Clean up. */
if (optimize && (flags & PROP_SCAN_DEAD_CODE))
if (optimize && (flags & PROP_SCAN_DEAD_STORES))
end_alias_analysis ();
if (file)
@ -646,6 +646,7 @@ update_life_info (blocks, extent, prop_flags)
calculate_global_regs_live (blocks, blocks,
prop_flags & (PROP_SCAN_DEAD_CODE
| PROP_SCAN_DEAD_STORES
| PROP_ALLOW_CFG_CHANGES));
if ((prop_flags & (PROP_KILL_DEAD_CODE | PROP_ALLOW_CFG_CHANGES))
@ -659,6 +660,7 @@ update_life_info (blocks, extent, prop_flags)
COPY_REG_SET (tmp, bb->global_live_at_end);
changed |= propagate_block (bb, tmp, NULL, NULL,
prop_flags & (PROP_SCAN_DEAD_CODE
| PROP_SCAN_DEAD_STORES
| PROP_KILL_DEAD_CODE));
}
@ -667,7 +669,8 @@ update_life_info (blocks, extent, prop_flags)
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);
&= ~(PROP_SCAN_DEAD_CODE | PROP_SCAN_DEAD_STORES
| PROP_KILL_DEAD_CODE);
if (! changed)
break;
@ -1922,7 +1925,7 @@ init_propagate_block_info (bb, live, local_set, cond_local_set, flags)
&& ! (TREE_CODE (TREE_TYPE (current_function_decl)) == FUNCTION_TYPE
&& (TYPE_RETURNS_STACK_DEPRESSED
(TREE_TYPE (current_function_decl))))
&& (flags & PROP_SCAN_DEAD_CODE)
&& (flags & PROP_SCAN_DEAD_STORES)
&& (bb->succ == NULL
|| (bb->succ->succ_next == NULL
&& bb->succ->dest == EXIT_BLOCK_PTR
@ -2609,7 +2612,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
/* If this set is a MEM, then it kills any aliased writes.
If this set is a REG, then it kills any MEMs which use the reg. */
if (optimize && (flags & PROP_SCAN_DEAD_CODE))
if (optimize && (flags & PROP_SCAN_DEAD_STORES))
{
if (GET_CODE (reg) == REG)
invalidate_mems_from_set (pbi, reg);
@ -3712,7 +3715,7 @@ mark_used_regs (pbi, x, cond, insn)
case MEM:
/* Don't bother watching stores to mems if this is not the
final pass. We'll not be deleting dead stores this round. */
if (optimize && (flags & PROP_SCAN_DEAD_CODE))
if (optimize && (flags & PROP_SCAN_DEAD_STORES))
{
/* Invalidate the data for the last MEM stored, but only if MEM is
something that can be stored into. */