-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-mir-optArea: MIR optimizationsArea: MIR optimizationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Local value numbering, local to a basic block, doesn't require SSA form, unlike global value numbering. We could straightforwardly run this optimization on MIR. In many cases, this would subsume constant and copy propagation, and it would also let us do nice things like detect commutativity and fold a + b
and b + a
together. It may be possible to do things that LLVM won't, due to it being much easier to prove &
and &mut
s disjoint when done on MIR.
Metadata
Metadata
Assignees
Labels
A-mir-optArea: MIR optimizationsArea: MIR optimizationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.