diff options
Diffstat (limited to 'gcc/gimple-streamer-out.c')
-rw-r--r-- | gcc/gimple-streamer-out.c | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/gcc/gimple-streamer-out.c b/gcc/gimple-streamer-out.c index 34a19134f0b..64ba66951cd 100644 --- a/gcc/gimple-streamer-out.c +++ b/gcc/gimple-streamer-out.c @@ -54,7 +54,7 @@ along with GCC; see the file COPYING3. If not see /* Output PHI function PHI to the main stream in OB. */ static void -output_phi (struct output_block *ob, gimple phi) +output_phi (struct output_block *ob, gphi *phi) { unsigned i, len = gimple_phi_num_args (phi); @@ -93,7 +93,10 @@ output_gimple_stmt (struct output_block *ob, gimple stmt) bp_pack_var_len_unsigned (&bp, gimple_num_ops (stmt)); bp_pack_value (&bp, gimple_no_warning_p (stmt), 1); if (is_gimple_assign (stmt)) - bp_pack_value (&bp, gimple_assign_nontemporal_move_p (stmt), 1); + bp_pack_value (&bp, + gimple_assign_nontemporal_move_p ( + as_a <gassign *> (stmt)), + 1); bp_pack_value (&bp, gimple_has_volatile_ops (stmt), 1); hist = gimple_histogram_value (cfun, stmt); bp_pack_value (&bp, hist != NULL, 1); @@ -110,24 +113,32 @@ output_gimple_stmt (struct output_block *ob, gimple stmt) switch (gimple_code (stmt)) { case GIMPLE_RESX: - streamer_write_hwi (ob, gimple_resx_region (stmt)); + streamer_write_hwi (ob, gimple_resx_region (as_a <gresx *> (stmt))); break; case GIMPLE_EH_MUST_NOT_THROW: - stream_write_tree (ob, gimple_eh_must_not_throw_fndecl (stmt), true); + stream_write_tree (ob, + gimple_eh_must_not_throw_fndecl ( + as_a <geh_mnt *> (stmt)), + true); break; case GIMPLE_EH_DISPATCH: - streamer_write_hwi (ob, gimple_eh_dispatch_region (stmt)); + streamer_write_hwi (ob, + gimple_eh_dispatch_region ( + as_a <geh_dispatch *> (stmt))); break; case GIMPLE_ASM: - streamer_write_uhwi (ob, gimple_asm_ninputs (stmt)); - streamer_write_uhwi (ob, gimple_asm_noutputs (stmt)); - streamer_write_uhwi (ob, gimple_asm_nclobbers (stmt)); - streamer_write_uhwi (ob, gimple_asm_nlabels (stmt)); - streamer_write_string (ob, ob->main_stream, gimple_asm_string (stmt), - true); + { + gasm *asm_stmt = as_a <gasm *> (stmt); + streamer_write_uhwi (ob, gimple_asm_ninputs (asm_stmt)); + streamer_write_uhwi (ob, gimple_asm_noutputs (asm_stmt)); + streamer_write_uhwi (ob, gimple_asm_nclobbers (asm_stmt)); + streamer_write_uhwi (ob, gimple_asm_nlabels (asm_stmt)); + streamer_write_string (ob, ob->main_stream, + gimple_asm_string (asm_stmt), true); + } /* Fallthru */ case GIMPLE_ASSIGN: @@ -187,8 +198,11 @@ output_gimple_stmt (struct output_block *ob, gimple stmt) break; case GIMPLE_TRANSACTION: - gcc_assert (gimple_transaction_body (stmt) == NULL); - stream_write_tree (ob, gimple_transaction_label (stmt), true); + { + gtransaction *trans_stmt = as_a <gtransaction *> (stmt); + gcc_assert (gimple_transaction_body (trans_stmt) == NULL); + stream_write_tree (ob, gimple_transaction_label (trans_stmt), true); + } break; default: @@ -240,9 +254,11 @@ output_bb (struct output_block *ob, basic_block bb, struct function *fn) streamer_write_record_start (ob, LTO_null); - for (bsi = gsi_start_phis (bb); !gsi_end_p (bsi); gsi_next (&bsi)) + for (gphi_iterator psi = gsi_start_phis (bb); + !gsi_end_p (psi); + gsi_next (&psi)) { - gimple phi = gsi_stmt (bsi); + gphi *phi = psi.phi (); /* Only emit PHIs for gimple registers. PHI nodes for .MEM will be filled in on reading when the SSA form is |