[PATCH] D145169: FastRegAlloc: Fix implicit operands not rewritten

Gaƫtan Bossu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 07:51:32 PST 2023


gbossu added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocFast.cpp:1410
+      useVirtReg(MI, I, Reg);
+      ChangedOperands = true;
+    }
----------------
arsenm wrote:
> Don't you only need to maybe repeat if you saw a kill use?
At the moment, that is right. I just preferred to play it safe because some of the callees inside `RegAllocFast::setPhysReg()` could potentially mess around with implicit operands further. Although, to this date, I haven't found any other case :) Tbh, it's also not easy to find out whether `useVirtReg()` has changed any implicit operands, so I preferred to be conservative.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145169/new/

https://reviews.llvm.org/D145169



More information about the llvm-commits mailing list