mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
Remove loop-incremented dead code.
gcc/ChangeLog: * genautomata.cc (create_composed_state): Remove dead code. * graphite-poly.cc (print_pdrs): Likewise. * lto-wrapper.cc (run_gcc): Likewise. * tree-switch-conversion.cc (switch_decision_tree::balance_case_nodes): Likewise.
This commit is contained in:
parent
6c53cf2e59
commit
880456ed99
@ -5661,7 +5661,6 @@ create_composed_state (state_t original_state, arc_t arcs_marked_by_insn,
|
|||||||
state_t state_in_table;
|
state_t state_in_table;
|
||||||
state_t temp_state;
|
state_t temp_state;
|
||||||
alt_state_t canonical_alt_states_list;
|
alt_state_t canonical_alt_states_list;
|
||||||
int alts_number;
|
|
||||||
int new_state_p = 0;
|
int new_state_p = 0;
|
||||||
|
|
||||||
if (arcs_marked_by_insn == NULL)
|
if (arcs_marked_by_insn == NULL)
|
||||||
@ -5731,17 +5730,15 @@ create_composed_state (state_t original_state, arc_t arcs_marked_by_insn,
|
|||||||
|| (curr_arc->insn->insn_reserv_decl
|
|| (curr_arc->insn->insn_reserv_decl
|
||||||
!= DECL_INSN_RESERV (advance_cycle_insn_decl)))
|
!= DECL_INSN_RESERV (advance_cycle_insn_decl)))
|
||||||
add_arc (state, curr_arc->to_state, curr_arc->insn);
|
add_arc (state, curr_arc->to_state, curr_arc->insn);
|
||||||
}
|
}
|
||||||
arcs_marked_by_insn->to_state = state;
|
arcs_marked_by_insn->to_state = state;
|
||||||
for (alts_number = 0,
|
for (curr_arc = arcs_marked_by_insn->next_arc_marked_by_insn;
|
||||||
curr_arc = arcs_marked_by_insn->next_arc_marked_by_insn;
|
curr_arc != NULL;
|
||||||
curr_arc != NULL;
|
curr_arc = next_arc)
|
||||||
curr_arc = next_arc)
|
{
|
||||||
{
|
next_arc = curr_arc->next_arc_marked_by_insn;
|
||||||
next_arc = curr_arc->next_arc_marked_by_insn;
|
remove_arc (original_state, curr_arc);
|
||||||
remove_arc (original_state, curr_arc);
|
}
|
||||||
alts_number++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!state->it_was_placed_in_stack_for_DFA_forming)
|
if (!state->it_was_placed_in_stack_for_DFA_forming)
|
||||||
|
@ -341,20 +341,10 @@ dump_gbb_conditions (FILE *file, gimple_poly_bb_p gbb)
|
|||||||
void
|
void
|
||||||
print_pdrs (FILE *file, poly_bb_p pbb)
|
print_pdrs (FILE *file, poly_bb_p pbb)
|
||||||
{
|
{
|
||||||
int nb_reads = 0;
|
|
||||||
int nb_writes = 0;
|
|
||||||
|
|
||||||
if (PBB_DRS (pbb).is_empty ())
|
if (PBB_DRS (pbb).is_empty ())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fprintf (file, "Data references (\n");
|
fprintf (file, "Data references (\n");
|
||||||
|
|
||||||
for (poly_dr_p pdr : PBB_DRS (pbb))
|
|
||||||
if (PDR_TYPE (pdr) == PDR_READ)
|
|
||||||
nb_reads++;
|
|
||||||
else
|
|
||||||
nb_writes++;
|
|
||||||
|
|
||||||
fprintf (file, "Read data references (\n");
|
fprintf (file, "Read data references (\n");
|
||||||
|
|
||||||
for (poly_dr_p pdr : PBB_DRS (pbb))
|
for (poly_dr_p pdr : PBB_DRS (pbb))
|
||||||
|
@ -1428,7 +1428,6 @@ run_gcc (unsigned argc, char *argv[])
|
|||||||
char **lto_argv, **ltoobj_argv;
|
char **lto_argv, **ltoobj_argv;
|
||||||
bool linker_output_rel = false;
|
bool linker_output_rel = false;
|
||||||
bool skip_debug = false;
|
bool skip_debug = false;
|
||||||
unsigned n_debugobj;
|
|
||||||
const char *incoming_dumppfx = dumppfx = NULL;
|
const char *incoming_dumppfx = dumppfx = NULL;
|
||||||
static char current_dir[] = { '.', DIR_SEPARATOR, '\0' };
|
static char current_dir[] = { '.', DIR_SEPARATOR, '\0' };
|
||||||
|
|
||||||
@ -1871,7 +1870,6 @@ cont1:
|
|||||||
|
|
||||||
/* Copy the early generated debug info from the objects to temporary
|
/* Copy the early generated debug info from the objects to temporary
|
||||||
files and append those to the partial link commandline. */
|
files and append those to the partial link commandline. */
|
||||||
n_debugobj = 0;
|
|
||||||
early_debug_object_names = NULL;
|
early_debug_object_names = NULL;
|
||||||
if (! skip_debug)
|
if (! skip_debug)
|
||||||
{
|
{
|
||||||
@ -1881,10 +1879,7 @@ cont1:
|
|||||||
{
|
{
|
||||||
const char *tem;
|
const char *tem;
|
||||||
if ((tem = debug_objcopy (ltoobj_argv[i], !linker_output_rel)))
|
if ((tem = debug_objcopy (ltoobj_argv[i], !linker_output_rel)))
|
||||||
{
|
early_debug_object_names[i] = tem;
|
||||||
early_debug_object_names[i] = tem;
|
|
||||||
n_debugobj++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2039,18 +2039,14 @@ switch_decision_tree::balance_case_nodes (case_tree_node **head,
|
|||||||
if (np)
|
if (np)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int ranges = 0;
|
|
||||||
case_tree_node **npp;
|
case_tree_node **npp;
|
||||||
case_tree_node *left;
|
case_tree_node *left;
|
||||||
profile_probability prob = profile_probability::never ();
|
profile_probability prob = profile_probability::never ();
|
||||||
|
|
||||||
/* Count the number of entries on branch. Also count the ranges. */
|
/* Count the number of entries on branch. */
|
||||||
|
|
||||||
while (np)
|
while (np)
|
||||||
{
|
{
|
||||||
if (!tree_int_cst_equal (np->m_c->get_low (), np->m_c->get_high ()))
|
|
||||||
ranges++;
|
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
prob += np->m_c->m_prob;
|
prob += np->m_c->m_prob;
|
||||||
np = np->m_right;
|
np = np->m_right;
|
||||||
@ -2063,8 +2059,8 @@ switch_decision_tree::balance_case_nodes (case_tree_node **head,
|
|||||||
left = *npp;
|
left = *npp;
|
||||||
profile_probability pivot_prob = prob.apply_scale (1, 2);
|
profile_probability pivot_prob = prob.apply_scale (1, 2);
|
||||||
|
|
||||||
/* Find the place in the list that bisects the list's total cost,
|
/* Find the place in the list that bisects the list's total cost
|
||||||
where ranges count as 2. */
|
by probability. */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* Skip nodes while their probability does not reach
|
/* Skip nodes while their probability does not reach
|
||||||
|
Loading…
Reference in New Issue
Block a user