Add a ControlFlowGraph argument to legalize_function.
Legalizing some instructions may require modifications to the control flow graph, and some operations need to use the CFG analysis. The CFG reference is threaded through all the legalization functions to reach the generated expansion functions as well as the legalizer::split module where it will be used first.
This commit is contained in:
@@ -42,10 +42,9 @@ impl SubTest for TestRegalloc {
|
||||
let mut comp_ctx = cretonne::Context::new();
|
||||
comp_ctx.func = func.into_owned();
|
||||
|
||||
comp_ctx.flowgraph();
|
||||
// TODO: Should we have an option to skip legalization?
|
||||
comp_ctx.legalize(isa);
|
||||
|
||||
comp_ctx.flowgraph();
|
||||
comp_ctx.regalloc(isa);
|
||||
|
||||
let mut text = String::new();
|
||||
|
||||
Reference in New Issue
Block a user