mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Clear domtree after cg_clif optimizations
This commit is contained in:
parent
1952b1ffae
commit
cfedad1f75
@ -117,6 +117,9 @@ pub(crate) fn codegen_fn<'tcx>(
|
||||
context.compute_domtree();
|
||||
context.eliminate_unreachable_code(cx.module.isa()).unwrap();
|
||||
context.dce(cx.module.isa()).unwrap();
|
||||
// Some Cranelift optimizations expect the domtree to not yet be computed and as such don't
|
||||
// invalidate it when it would change.
|
||||
context.domtree.clear();
|
||||
|
||||
context.want_disasm = crate::pretty_clif::should_write_ir(tcx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user