summaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-11 11:19:01 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-11 11:19:01 +0000
commit10c7be7ea6e54fc16864f455ffd8e57404b1a467 (patch)
treeee70b35cdded91a6e9f721e4c5cbaedad09528ad /gcc/gimple-low.c
parentd59974987297588b3031ef2f2ae409c5bd858bd0 (diff)
downloadgcc-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/gimple-low.c')
-rw-r--r--gcc/gimple-low.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 4a1ae0bfa9a..04d4275f75b 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -112,10 +112,6 @@ lower_function_body (void)
i = gsi_start (lowered_body);
lower_gimple_bind (&i, &data);
- /* Once the old body has been lowered, replace it with the new
- lowered sequence. */
- gimple_set_body (current_function_decl, lowered_body);
-
i = gsi_last (lowered_body);
/* If the function falls off the end, we need a null return statement.
@@ -179,6 +175,10 @@ lower_function_body (void)
gsi_insert_after (&i, x, GSI_CONTINUE_LINKING);
}
+ /* Once the old body has been lowered, replace it with the new
+ lowered sequence. */
+ gimple_set_body (current_function_decl, lowered_body);
+
gcc_assert (data.block == DECL_INITIAL (current_function_decl));
BLOCK_SUBBLOCKS (data.block)
= blocks_nreverse (BLOCK_SUBBLOCKS (data.block));
@@ -305,11 +305,11 @@ gimple_check_call_matching_types (gimple call_stmt, tree callee)
do it explicitly. DATA is passed through the recursion. */
static void
-lower_sequence (gimple_seq seq, struct lower_data *data)
+lower_sequence (gimple_seq *seq, struct lower_data *data)
{
gimple_stmt_iterator gsi;
- for (gsi = gsi_start (seq); !gsi_end_p (gsi); )
+ for (gsi = gsi_start (*seq); !gsi_end_p (gsi); )
lower_stmt (&gsi, data);
}
@@ -324,11 +324,10 @@ lower_omp_directive (gimple_stmt_iterator *gsi, struct lower_data *data)
stmt = gsi_stmt (*gsi);
- lower_sequence (gimple_omp_body (stmt), data);
- gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
- gsi_insert_seq_before (gsi, gimple_omp_body (stmt), GSI_SAME_STMT);
+ lower_sequence (gimple_omp_body_ptr (stmt), data);
+ gsi_insert_seq_after (gsi, gimple_omp_body (stmt), GSI_CONTINUE_LINKING);
gimple_omp_set_body (stmt, NULL);
- gsi_remove (gsi, false);
+ gsi_next (gsi);
}
@@ -376,10 +375,10 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
case GIMPLE_TRY:
{
bool try_cannot_fallthru;
- lower_sequence (gimple_try_eval (stmt), data);
+ lower_sequence (gimple_try_eval_ptr (stmt), data);
try_cannot_fallthru = data->cannot_fallthru;
data->cannot_fallthru = false;
- lower_sequence (gimple_try_cleanup (stmt), data);
+ lower_sequence (gimple_try_cleanup_ptr (stmt), data);
/* See gimple_stmt_may_fallthru for the rationale. */
if (gimple_try_kind (stmt) == GIMPLE_TRY_FINALLY)
{
@@ -392,17 +391,17 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
case GIMPLE_CATCH:
data->cannot_fallthru = false;
- lower_sequence (gimple_catch_handler (stmt), data);
+ lower_sequence (gimple_catch_handler_ptr (stmt), data);
break;
case GIMPLE_EH_FILTER:
data->cannot_fallthru = false;
- lower_sequence (gimple_eh_filter_failure (stmt), data);
+ lower_sequence (gimple_eh_filter_failure_ptr (stmt), data);
break;
case GIMPLE_EH_ELSE:
- lower_sequence (gimple_eh_else_n_body (stmt), data);
- lower_sequence (gimple_eh_else_e_body (stmt), data);
+ lower_sequence (gimple_eh_else_n_body_ptr (stmt), data);
+ lower_sequence (gimple_eh_else_e_body_ptr (stmt), data);
break;
case GIMPLE_NOP:
@@ -456,7 +455,7 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
return;
case GIMPLE_TRANSACTION:
- lower_sequence (gimple_transaction_body (stmt), data);
+ lower_sequence (gimple_transaction_body_ptr (stmt), data);
break;
default:
@@ -505,7 +504,7 @@ lower_gimple_bind (gimple_stmt_iterator *gsi, struct lower_data *data)
}
record_vars (gimple_bind_vars (stmt));
- lower_sequence (gimple_bind_body (stmt), data);
+ lower_sequence (gimple_bind_body_ptr (stmt), data);
if (new_block)
{
@@ -585,7 +584,7 @@ gimple_try_catch_may_fallthru (gimple stmt)
if (gimple_seq_may_fallthru (gimple_try_eval (stmt)))
return true;
- i = gsi_start (gimple_try_cleanup (stmt));
+ i = gsi_start (*gimple_try_cleanup_ptr (stmt));
switch (gimple_code (gsi_stmt (i)))
{
case GIMPLE_CATCH: