Drop the domtree argument to legalize_function().

Future legalization patterns will have the ability to mutate the
flowgraph, so the domtree's list of RPO blocks is not a good guide for
iteration. Use the layout order instead. This will pick up any new EBBs
inserted.
This commit is contained in:
Jakob Stoklund Olesen
2017-08-25 10:36:25 -07:00
parent aae946128b
commit fecbcbb7b4
2 changed files with 5 additions and 11 deletions

View File

@@ -103,7 +103,7 @@ impl Context {
/// Run the legalizer for `isa` on the function.
pub fn legalize(&mut self, isa: &TargetIsa) -> CtonResult {
legalize_function(&mut self.func, &mut self.cfg, &self.domtree, isa);
legalize_function(&mut self.func, &mut self.cfg, isa);
self.verify_if(isa)
}