[llvm] [CodeGen] MachineLICM: Do not consider "loop liveins" as loop defs (PR #121769)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 07:03:39 PST 2025


================
@@ -644,6 +638,16 @@ void MachineLICMImpl::HoistRegionPostRA(MachineLoop *CurLoop,
       ProcessMI(&MI, RUDefs, RUClobbers, StoredFIs, Candidates, CurLoop);
   }
 
+  // Mark registers as clobbered if they are livein and also defined in the loop
+  for (const auto &LoopLI : CurLoop->getHeader()->liveins()) {
----------------
gbossu wrote:

Good catch, I actually have an NFC commit planned to replace more of `MachineLICM` with LiveRegUnits. Here I'm just trying to minimise the number of changes.

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


More information about the llvm-commits mailing list