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:
Martin Liska 2022-04-12 15:06:40 +02:00
parent 6c53cf2e59
commit 880456ed99
4 changed files with 13 additions and 35 deletions

View File

@ -5661,7 +5661,6 @@ create_composed_state (state_t original_state, arc_t arcs_marked_by_insn,
state_t state_in_table;
state_t temp_state;
alt_state_t canonical_alt_states_list;
int alts_number;
int new_state_p = 0;
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
!= DECL_INSN_RESERV (advance_cycle_insn_decl)))
add_arc (state, curr_arc->to_state, curr_arc->insn);
}
arcs_marked_by_insn->to_state = state;
for (alts_number = 0,
curr_arc = arcs_marked_by_insn->next_arc_marked_by_insn;
curr_arc != NULL;
curr_arc = next_arc)
{
next_arc = curr_arc->next_arc_marked_by_insn;
remove_arc (original_state, curr_arc);
alts_number++;
}
}
arcs_marked_by_insn->to_state = state;
for (curr_arc = arcs_marked_by_insn->next_arc_marked_by_insn;
curr_arc != NULL;
curr_arc = next_arc)
{
next_arc = curr_arc->next_arc_marked_by_insn;
remove_arc (original_state, curr_arc);
}
}
}
if (!state->it_was_placed_in_stack_for_DFA_forming)

View File

@ -341,20 +341,10 @@ dump_gbb_conditions (FILE *file, gimple_poly_bb_p gbb)
void
print_pdrs (FILE *file, poly_bb_p pbb)
{
int nb_reads = 0;
int nb_writes = 0;
if (PBB_DRS (pbb).is_empty ())
return;
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");
for (poly_dr_p pdr : PBB_DRS (pbb))

View File

@ -1428,7 +1428,6 @@ run_gcc (unsigned argc, char *argv[])
char **lto_argv, **ltoobj_argv;
bool linker_output_rel = false;
bool skip_debug = false;
unsigned n_debugobj;
const char *incoming_dumppfx = dumppfx = NULL;
static char current_dir[] = { '.', DIR_SEPARATOR, '\0' };
@ -1871,7 +1870,6 @@ cont1:
/* Copy the early generated debug info from the objects to temporary
files and append those to the partial link commandline. */
n_debugobj = 0;
early_debug_object_names = NULL;
if (! skip_debug)
{
@ -1881,10 +1879,7 @@ cont1:
{
const char *tem;
if ((tem = debug_objcopy (ltoobj_argv[i], !linker_output_rel)))
{
early_debug_object_names[i] = tem;
n_debugobj++;
}
early_debug_object_names[i] = tem;
}
}

View File

@ -2039,18 +2039,14 @@ switch_decision_tree::balance_case_nodes (case_tree_node **head,
if (np)
{
int i = 0;
int ranges = 0;
case_tree_node **npp;
case_tree_node *left;
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)
{
if (!tree_int_cst_equal (np->m_c->get_low (), np->m_c->get_high ()))
ranges++;
i++;
prob += np->m_c->m_prob;
np = np->m_right;
@ -2063,8 +2059,8 @@ switch_decision_tree::balance_case_nodes (case_tree_node **head,
left = *npp;
profile_probability pivot_prob = prob.apply_scale (1, 2);
/* Find the place in the list that bisects the list's total cost,
where ranges count as 2. */
/* Find the place in the list that bisects the list's total cost
by probability. */
while (1)
{
/* Skip nodes while their probability does not reach