Add a fold_redundant_jumps() pass to the branch relaxation phase. (#887)

This commit is contained in:
Sean Stangl
2019-08-09 15:30:11 -06:00
committed by GitHub
parent e6e274a3aa
commit c7b4b98cac
8 changed files with 178 additions and 41 deletions

View File

@@ -329,7 +329,7 @@ impl Context {
/// Run the branch relaxation pass and return information about the function's code and
/// read-only data.
pub fn relax_branches(&mut self, isa: &dyn TargetIsa) -> CodegenResult<CodeInfo> {
let info = relax_branches(&mut self.func, isa)?;
let info = relax_branches(&mut self.func, &mut self.cfg, &mut self.domtree, isa)?;
self.verify_if(isa)?;
self.verify_locations_if(isa)?;
Ok(info)