[PATCH] D144099: [WIP][AMDGPU] Fold more AGPR copies/PHIs in SIFoldOperands
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 23:55:09 PST 2023
Pierre-vh added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:1631
-// Try to hoist an AGPR to VGPR copy out of the loop across a LCSSA PHI.
+static Register tryFindExistingCopy(MachineRegisterInfo &MRI,
+ MachineInstr &Begin, Register FromReg,
----------------
arsenm wrote:
> If SIFoldOperands worked like PeepholeOpt, you would have a map of these already. I'd rather avoid a linear scan backwards for every copy
Do you mean that it's fine to store these in a map, or that we can't do that here?
I'd also like to avoid the backwards scan if possible
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144099/new/
https://reviews.llvm.org/D144099
More information about the llvm-commits
mailing list