[llvm] [MCP] Handle iterative simplification during forward copy prop (PR #140267)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 08:30:51 PDT 2025


================
@@ -915,51 +907,6 @@ void MachineCopyPropagation::ForwardCopyPropagateBlock(MachineBasicBlock &MBB) {
         //  %ecx = COPY %eax
         if (eraseIfRedundant(MI, Def, Src) || eraseIfRedundant(MI, Src, Def))
----------------
preames wrote:

Slightly OT for this review, but I think the eraseIfRedundant case could be removed.  The key thing it does which the main copy propagation doesn't is reason about super-registers updating sub-registers in known ways.  We could generalize the main pass, and I think this code would become redundant.  I *may* explore this further, or may not.  

https://github.com/llvm/llvm-project/pull/140267


More information about the llvm-commits mailing list