+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.
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 */
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
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)
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))
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));
}
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;
&& ! (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
/* 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);
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. */