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:
@@ -47,7 +47,7 @@ impl Context {
|
||||
|
||||
/// Run the legalizer for `isa` on the function.
|
||||
pub fn legalize(&mut self, isa: &TargetIsa) {
|
||||
legalize_function(&mut self.func, isa);
|
||||
legalize_function(&mut self.func, &mut self.cfg, isa);
|
||||
}
|
||||
|
||||
/// Recompute the control flow graph and dominator tree.
|
||||
|
||||
Reference in New Issue
Block a user