[llvm] [MCP][NFC] Refactor eliminateSpillageCopies (PR #208210)

Jack Styles via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 02:24:03 PDT 2026


================
@@ -1263,18 +1263,32 @@ void MachineCopyPropagation::backwardCopyPropagateBlock(
   Tracker.clear();
 }
 
+/// StructReloadPair defines a pair of Machine Instructions where the Spill is
+/// the Instruction spilling the physical register, and the associated reload
+/// for that physical register. Take the following example
+/// r2 = COPY x5 // Spill
+/// ....
+/// r5 = COPY r2 // Reload
 struct SpillReloadPair {
   MachineInstr *Spill = nullptr;
   MachineInstr *Reload = nullptr;
----------------
Stylie777 wrote:

There is `isChainedCopy` which confirms if 2 Machine Instructions are part of a Copy Chain. It uses this when building a chain when trying to find if a chain already exists, and if this is indeed a chain. 

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


More information about the llvm-commits mailing list