[PATCH] D108830: [AMDGPU] Propagate defining src reg for AGPR to AGPR Copys
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 14:03:45 PDT 2021
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp:90
+ bool Changed = false;
+ SmallSet<Register, 4> ModifiedRegs;
----------------
A largest tuple is 32, so maybe SmallSet<Register, 32>?
================
Comment at: llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp:102
+ // accvgpr_write to avoid temporary registers.
+ bool IsAGPRDst = TRI->isAGPRClass(MRI->getRegClass(Reg));
+ if (!IsAGPRDst)
----------------
Can you hoist it out the loop? Reg is loop invariant.
================
Comment at: llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp:175
+ // For AGPR reg, check if live intervals need to be updated.
+ if (TRI->isAGPRClass(MRI->getRegClass(Reg))) {
+ if (Changed) {
----------------
Also replace it with hoisted IsAGPRDst.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108830/new/
https://reviews.llvm.org/D108830
More information about the llvm-commits
mailing list