The register allocator is really a pass, so arrange the code like one.
This commit is contained in:
parent
87e004e4a9
commit
d20b63dc94
|
@ -107,11 +107,10 @@ extern void pass_eliminate_trivial_blocks(struct procedure* proc);
|
|||
extern void pass_group_irs(struct procedure* proc);
|
||||
extern void pass_instruction_selector(struct procedure* proc);
|
||||
extern void pass_promote_float_ops(struct procedure* proc);
|
||||
extern void pass_register_allocator(struct procedure* proc);
|
||||
extern void pass_remove_dead_blocks(struct procedure* proc);
|
||||
extern void pass_split_critical_edges(struct procedure* proc);
|
||||
|
||||
extern void register_allocator(struct procedure* proc);
|
||||
|
||||
#endif
|
||||
|
||||
/* vim: set sw=4 ts=4 expandtab : */
|
||||
|
|
|
@ -20,7 +20,7 @@ static void recursively_walk_dominance_graph(struct basicblock* bb)
|
|||
}
|
||||
}
|
||||
|
||||
void register_allocator(struct procedure* proc)
|
||||
void pass_register_allocator(struct procedure* proc)
|
||||
{
|
||||
calculate_dominance_graph(proc);
|
||||
|
|
@ -49,7 +49,9 @@ void procedure_compile(struct procedure* proc)
|
|||
pass_remove_dead_blocks(proc);
|
||||
|
||||
procedure_update_bb_graph(proc);
|
||||
/* Passes from here on can't alter the BB graph */
|
||||
|
||||
/* Passes from here on can't alter the BB graph without also updating prevs
|
||||
* and nexts. */
|
||||
|
||||
print_blocks('2', proc);
|
||||
pass_convert_stack_ops(proc);
|
||||
|
@ -62,8 +64,7 @@ void procedure_compile(struct procedure* proc)
|
|||
print_blocks('6', proc);
|
||||
|
||||
pass_instruction_selector(proc);
|
||||
|
||||
register_allocator(proc);
|
||||
pass_register_allocator(proc);
|
||||
}
|
||||
|
||||
static bool collect_outputs_cb(struct ir* ir, void* user)
|
||||
|
|
Loading…
Reference in a new issue