[PATCH] D114643: [AMDGPU] Aggressively fold immediates in SIFoldOperands

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 05:49:07 PDT 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:1246-1249
+  SmallVector<MachineOperand *, 4> UsesToProcess;
+  for (auto &Use : MRI->use_nodbg_operands(Dst.getReg()))
+    UsesToProcess.push_back(&Use);
+  for (auto U : UsesToProcess) {
----------------
sebastian-ne wrote:
> Can this use `make_early_inc_range` instead of caching the small vector like in the if-case? (if so, this probably makes more sense as an NFC patch afterwards)
Not sure. I can try that as a follow-up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114643



More information about the llvm-commits mailing list