On Tue, May 30, 2006 at 08:57:57PM +0200, Paolo Bonzini wrote: > int > default_reorder2 (FILE *dump ATTRIBUTE_UNUSED, > int sched_verbose ATTRIBUTE_UNUSED, > rtx *ready, int *pn_ready, > int clock_var ATTRIBUTE_UNUSED) > { > int n_ready = *pn_ready; > > /* This is correct for sched-rgn.c only. */ > if (reload_completed > && (flag_sched2_use_superblocks || flag_sched2_use_traces)) > return 0; > > if (n_ready > 1) > { > basic_block bb = BLOCK_FOR_INSN (current_sched_info->prev_head); > > if (BLOCK_FOR_INSN (ready[n_ready - 1]) != bb) > { > int i; > > for (i = n_ready - 1; i >= 0; i--) > { > rtx insn = ready[i]; > > if (BLOCK_FOR_INSN (insn) != bb) > continue; > > memcpy (ready + i, ready + i + 1, > (n_ready - i - 1) * sizeof (*ready)); > ready[n_ready - 1] = insn; > break; > } > } > } > > return 0; > }
Not even a single comment - shame on you both! :-) If this is the solution we choose, can we make sure that there's at least a comment explaining what's going on? -- Daniel Jacobowitz CodeSourcery