src/lima/pp_lir/scheduler.h
/* 
 * scheduler.h
 *
 * internal header, provides the common boilerplate code for implementing a
 * scheduler. To actually implement a scheduler, you need to implement a
 * function to insert instructions using the sched_insert_before(),
 * sched_insert_start(), and sched_insert_end() helpers - you can also combine
 * the instruction, as long as it goes before its earliest successor, as well
 * as a function to determine which instructions to prioritize. Note that we
 * schedule *backwards*, starting from instructions that have no successors.
 */
scheduler.h
internal header, provides the common boilerplate code for implementing a
scheduler. To actually implement a scheduler, you need to implement a
function to insert instructions using the sched_insert_before(),
sched_insert_start(), and sched_insert_end() helpers - you can also combine
the instruction, as long as it goes before its earliest successor, as well
as a function to determine which instructions to prioritize. Note that we
schedule *backwards*, starting from instructions that have no successors.
scheduler . h internal header provides the common boilerplate code for implementing a scheduler . To actually implement a scheduler you need to implement a function to insert instructions using the sched_insert_before () sched_insert_start () and sched_insert_end () helpers - you can also combine the instruction as long as it goes before its earliest successor as well as a function to determine which instructions to prioritize . Note that we schedule * backwards * starting from instructions that have no successors .
static inline void sched_insert_before(lima_pp_lir_scheduled_instr_t* instr,
									   lima_pp_lir_scheduled_instr_t* after)
{
	list_add(&instr->instr_list, after->instr_list.prev);
	instr->index = after->index + 1;
	instr->block->num_instrs++;
}
static inline void sched_insert_before ( lima_pp_lir_scheduled_instr_t * instr , lima_pp_lir_scheduled_instr_t * after ) { list_add ( & instr -> instr_list , after -> instr_list . prev ) ; instr -> index = after -> index + 1 ; instr -> block -> num_instrs ++ ; }
scheduler.h
 internal header, provides the common boilerplate code for implementing a
 scheduler.
scheduler . h internal header provides the common boilerplate code for implementing a scheduler .