comparison gcc/gimple-streamer-out.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Routines for emitting GIMPLE to a file stream. 1 /* Routines for emitting GIMPLE to a file stream.
2 2
3 Copyright (C) 2011-2017 Free Software Foundation, Inc. 3 Copyright (C) 2011-2018 Free Software Foundation, Inc.
4 Contributed by Diego Novillo <dnovillo@google.com> 4 Contributed by Diego Novillo <dnovillo@google.com>
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
8 GCC is free software; you can redistribute it and/or modify it under 8 GCC is free software; you can redistribute it and/or modify it under
29 #include "gimple-streamer.h" 29 #include "gimple-streamer.h"
30 #include "tree-eh.h" 30 #include "tree-eh.h"
31 #include "gimple-iterator.h" 31 #include "gimple-iterator.h"
32 #include "cgraph.h" 32 #include "cgraph.h"
33 #include "value-prof.h" 33 #include "value-prof.h"
34 #include "gimple-pretty-print.h"
34 35
35 /* Output PHI function PHI to the main stream in OB. */ 36 /* Output PHI function PHI to the main stream in OB. */
36 37
37 static void 38 static void
38 output_phi (struct output_block *ob, gphi *phi) 39 output_phi (struct output_block *ob, gphi *phi)
208 ? LTO_bb1 209 ? LTO_bb1
209 : LTO_bb0); 210 : LTO_bb0);
210 211
211 streamer_write_uhwi (ob, bb->index); 212 streamer_write_uhwi (ob, bb->index);
212 bb->count.stream_out (ob); 213 bb->count.stream_out (ob);
213 streamer_write_hwi (ob, bb->frequency);
214 streamer_write_hwi (ob, bb->flags); 214 streamer_write_hwi (ob, bb->flags);
215 streamer_write_hwi (ob, bb->discriminator);
215 216
216 if (!gsi_end_p (bsi) || phi_nodes (bb)) 217 if (!gsi_end_p (bsi) || phi_nodes (bb))
217 { 218 {
218 /* Output the statements. The list of statements is terminated 219 /* Output the statements. The list of statements is terminated
219 with a zero. */ 220 with a zero. */
220 for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) 221 for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))
221 { 222 {
222 int region; 223 int region;
223 gimple *stmt = gsi_stmt (bsi); 224 gimple *stmt = gsi_stmt (bsi);
225 if (streamer_dump_file)
226 {
227 fprintf (streamer_dump_file, " Streaming gimple stmt ");
228 print_gimple_stmt (streamer_dump_file, stmt, 0, TDF_SLIM);
229 }
224 230
225 output_gimple_stmt (ob, stmt); 231 output_gimple_stmt (ob, stmt);
226 232
227 /* Emit the EH region holding STMT. */ 233 /* Emit the EH region holding STMT. */
228 region = lookup_stmt_eh_lp_fn (fn, stmt); 234 region = lookup_stmt_eh_lp_fn (fn, stmt);