void
jump_table_cluster::emit (tree index_expr, tree,
- tree default_label_expr, basic_block default_bb)
+ tree default_label_expr, basic_block default_bb,
+ location_t loc)
{
unsigned HOST_WIDE_INT range = get_range (get_low (), get_high ());
unsigned HOST_WIDE_INT nondefault_range = 0;
gswitch *s = gimple_build_switch (index_expr,
unshare_expr (default_label_expr), labels);
+ gimple_set_location (s, loc);
gimple_stmt_iterator gsi = gsi_start_bb (m_case_bb);
gsi_insert_after (&gsi, s, GSI_NEW_STMT);
void
bit_test_cluster::emit (tree index_expr, tree index_type,
- tree, basic_block default_bb)
+ tree, basic_block default_bb, location_t)
{
case_bit_test test[m_max_case_bit_tests] = { {} };
unsigned int i, j, k;
{
cluster *c = clusters[0];
c->emit (index_expr, index_type,
- gimple_switch_default_label (m_switch), m_default_bb);
+ gimple_switch_default_label (m_switch), m_default_bb,
+ gimple_location (m_switch));
redirect_edge_succ (single_succ_edge (bb), c->m_case_bb);
}
else
if (clusters[i]->get_type () != SIMPLE_CASE)
clusters[i]->emit (index_expr, index_type,
gimple_switch_default_label (m_switch),
- m_default_bb);
+ m_default_bb, gimple_location (m_switch));
}
fix_phi_operands_for_edges ();
virtual void dump (FILE *f, bool details = false) = 0;
/* Emit GIMPLE code to handle the cluster. */
- virtual void emit (tree, tree, tree, basic_block) = 0;
+ virtual void emit (tree, tree, tree, basic_block, location_t) = 0;
/* Return true if a cluster handles only a single case value and the
value is not a range. */
fprintf (f, " ");
}
- void emit (tree, tree, tree, basic_block)
+ void emit (tree, tree, tree, basic_block, location_t)
{
gcc_unreachable ();
}
}
void emit (tree index_expr, tree index_type,
- tree default_label_expr, basic_block default_bb);
+ tree default_label_expr, basic_block default_bb, location_t loc);
/* Find jump tables of given CLUSTERS, where all members of the vector
are of type simple_cluster. New clusters are returned. */
There *MUST* be max_case_bit_tests or less unique case
node targets. */
void emit (tree index_expr, tree index_type,
- tree default_label_expr, basic_block default_bb);
+ tree default_label_expr, basic_block default_bb, location_t loc);
/* Find bit tests of given CLUSTERS, where all members of the vector
are of type simple_cluster. New clusters are returned. */