diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-27 10:15:57 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-27 10:15:57 +0000 |
commit | 2d30935d3561a6e5c4406c3ba363f05671eca853 (patch) | |
tree | da9f1e46251a76c45311b1d2ca5dc31b4bb913a9 /gcc | |
parent | 3fdc43bb6a3c0f4084d03ec7868f6d2f38d459b1 (diff) | |
download | gcc-2d30935d3561a6e5c4406c3ba363f05671eca853.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53920 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/basic-block.h | 7 | ||||
-rw-r--r-- | gcc/flow.c | 15 |
3 files changed, 23 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 210eb525d9b..8f6a1c59406 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 69ec1224b4e..e88871f2cb4 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -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 */ diff --git a/gcc/flow.c b/gcc/flow.c index 1fb5a16eabb..4719dcce418 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -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. */ |