/* The tracer pass for the GNU compiler.
Contributed by Jan Hubicka, SuSE Labs.
Adapted to work on GIMPLE instead of RTL by Robert Kidd, UIUC.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of GCC.
{
if (bb->index < NUM_FIXED_BLOCKS)
return true;
- if (!maybe_hot_bb_p (bb))
+ if (optimize_bb_for_size_p (bb))
return true;
return false;
}
static int
count_insns (basic_block bb)
{
- block_stmt_iterator bsi;
- tree stmt;
+ gimple_stmt_iterator gsi;
+ gimple stmt;
int n = 0;
- for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
+ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
- stmt = bsi_stmt (bsi);
+ stmt = gsi_stmt (gsi);
n += estimate_num_insns (stmt, &eni_size_weights);
}
return n;
while (traced_insns < cover_insns && nduplicated < max_dup_insns
&& !fibheap_empty (heap))
{
- basic_block bb = fibheap_extract_min (heap);
+ basic_block bb = (basic_block) fibheap_extract_min (heap);
int n, pos;
if (!bb)
nduplicated += counts [bb2->index];
e = find_edge (bb, bb2);
-
+
copy = duplicate_block (bb2, e, bb);
flush_pending_stmts (e);
return (optimize > 0 && flag_tracer && flag_reorder_blocks);
}
-struct tree_opt_pass pass_tracer =
+struct gimple_opt_pass pass_tracer =
{
+ {
+ GIMPLE_PASS,
"tracer", /* name */
gate_tracer, /* gate */
tracer, /* execute */
0, /* todo_flags_start */
TODO_dump_func
| TODO_update_ssa
- | TODO_verify_ssa, /* todo_flags_finish */
- 'T' /* letter */
+ | TODO_verify_ssa /* todo_flags_finish */
+ }
};