diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-11 11:19:01 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-11 11:19:01 +0000 |
commit | 10c7be7ea6e54fc16864f455ffd8e57404b1a467 (patch) | |
tree | ee70b35cdded91a6e9f721e4c5cbaedad09528ad /gcc/tree-ssa-dse.c | |
parent | d59974987297588b3031ef2f2ae409c5bd858bd0 (diff) | |
download | gcc-10c7be7ea6e54fc16864f455ffd8e57404b1a467.tar.gz |
2012-05-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 187397 using svnmerge
gimple_seq are disappearing!
[gcc/]
2012-05-11 Basile Starynkevitch <basile@starynkevitch.net>
{{for merge with trunk svn 187397, since gimple_seq are
disappearing in GCC 4.8}}
* melt-runtime.h (melt_gt_ggc_mx_gimple_seq_d): New declaration
(gt_ggc_mx_gimple_seq_d): Macro defined when GCC 4.8 only.
* melt-runtime.c (melt_gt_ggc_mx_gimple_seq_d): New function,
defined for GCC 4.8 only.
* melt/warmelt-debug.melt (melt_debug_fun): Add cast in our
warning diagnostic to avoid a warning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@187401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dse.c')
-rw-r--r-- | gcc/tree-ssa-dse.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index a8599420763..5fdba8c543b 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -199,9 +199,9 @@ dse_possible_dead_store_p (gimple stmt, gimple *use_stmt) post dominates the first store, then the first store is dead. */ static void -dse_optimize_stmt (gimple_stmt_iterator gsi) +dse_optimize_stmt (gimple_stmt_iterator *gsi) { - gimple stmt = gsi_stmt (gsi); + gimple stmt = gsi_stmt (*gsi); /* If this statement has no virtual defs, then there is nothing to do. */ @@ -252,7 +252,7 @@ dse_optimize_stmt (gimple_stmt_iterator gsi) if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, " Deleted dead store '"); - print_gimple_stmt (dump_file, gsi_stmt (gsi), dump_flags, 0); + print_gimple_stmt (dump_file, gsi_stmt (*gsi), dump_flags, 0); fprintf (dump_file, "'\n"); } @@ -261,7 +261,7 @@ dse_optimize_stmt (gimple_stmt_iterator gsi) /* Remove the dead store. */ bb = gimple_bb (stmt); - if (gsi_remove (&gsi, true)) + if (gsi_remove (gsi, true)) bitmap_set_bit (need_eh_cleanup, bb->index); /* And release any SSA_NAMEs set in this statement back to the @@ -277,8 +277,14 @@ dse_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, { gimple_stmt_iterator gsi; - for (gsi = gsi_last (bb_seq (bb)); !gsi_end_p (gsi); gsi_prev (&gsi)) - dse_optimize_stmt (gsi); + for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi);) + { + dse_optimize_stmt (&gsi); + if (gsi_end_p (gsi)) + gsi = gsi_last_bb (bb); + else + gsi_prev (&gsi); + } } /* Main entry point. */ |