Local value numbering for MIR #91688
Labels
A-mir-opt
Area: MIR optimizations
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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
andb + 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.The text was updated successfully, but these errors were encountered: