aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-06-09 23:08:05 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-06-09 23:08:05 +0000
commite69decfd36cabe29f106ff1c277706ac621e690f (patch)
treef0c3c1d31037575d513cf3e9d55b3b78b385ae09 /gcc/toplev.c
parent3bce8a01efc92473c193976352a6c8c7dd3d1f4a (diff)
downloadgcc-e69decfd36cabe29f106ff1c277706ac621e690f.zip
gcc-e69decfd36cabe29f106ff1c277706ac621e690f.tar.gz
gcc-e69decfd36cabe29f106ff1c277706ac621e690f.tar.bz2
expr.c (expand_expr, [...]): Do not replace an array element with the known initializing value if...
* expr.c (expand_expr, case ARRAY_REF): Do not replace an array element with the known initializing value if it has side-effects. * toplev.c (rest_of_compilation): Remove dead code before purge_addressof. From-SVN: r43120
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 0e197cc..2b75aa2 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -3031,6 +3031,16 @@ rest_of_compilation (decl)
timevar_pop (TV_JUMP);
}
+ /* It's important to remove dead code before we call
+ purge_addressof. Sometimes, the only ADDRESSOFs for a REG
+ will be dead, and if we don't get rid of them, we will end up
+ committing ourselves to dumping the REG to the stack
+ unnecessarily. */
+ find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
+ cleanup_cfg ();
+ life_analysis (insns, rtl_dump_file,
+ PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE);
+
/* The second pass of jump optimization is likely to have
removed a bunch more instructions. */
renumber_insns (rtl_dump_file);