Don't run the DCE pass when optimization is disabled.
The main purpose of the DCE pass is to clean up dead code left behind by the optimizer, so it's not valuable to run it when the optimizer isn't being run.
This commit is contained in:
@@ -105,7 +105,9 @@ impl Context {
|
|||||||
}
|
}
|
||||||
self.compute_domtree();
|
self.compute_domtree();
|
||||||
self.eliminate_unreachable_code(isa)?;
|
self.eliminate_unreachable_code(isa)?;
|
||||||
self.dce(isa)?;
|
if isa.flags().opt_level() != OptLevel::Fastest {
|
||||||
|
self.dce(isa)?;
|
||||||
|
}
|
||||||
self.regalloc(isa)?;
|
self.regalloc(isa)?;
|
||||||
self.prologue_epilogue(isa)?;
|
self.prologue_epilogue(isa)?;
|
||||||
self.relax_branches(isa)
|
self.relax_branches(isa)
|
||||||
|
|||||||
Reference in New Issue
Block a user