Add branch order optimization to simple_preopt to encourage fallthroughs.

This commit is contained in:
Tyler McMullen
2018-12-20 16:36:49 -08:00
committed by Benjamin Bouvier
parent 57f087c9da
commit 947130be81
2 changed files with 191 additions and 4 deletions

View File

@@ -225,7 +225,7 @@ impl Context {
/// Perform pre-legalization rewrites on the function.
pub fn preopt(&mut self, isa: &TargetIsa) -> CodegenResult<()> {
do_preopt(&mut self.func);
do_preopt(&mut self.func, &mut self.cfg);
self.verify_if(isa)?;
Ok(())
}