[PATCH] D157719: [AMDGPU] [SIFrameLowering] Replace LivePhysRegs with LiveRegUnits
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 07:51:05 PDT 2023
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/LiveRegUnits.cpp:89
+ MCPhysReg Reg) const {
+ for (MCRegUnit Unit : TRI->regunits(Reg)) {
+ if (Units.test(Unit))
----------------
Isn't this just:
`return !MRI.isReserved(Reg) && available(Reg);`
?
================
Comment at: llvm/lib/CodeGen/LiveRegUnits.cpp:99
+bool LiveRegUnits::available(MCPhysReg Reg) const {
+ for (MCRegUnit Unit : TRI->regunits(Reg)) {
+ if (Units.test(Unit))
----------------
Could rewrite this using `none_of` since you're moving this code anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157719/new/
https://reviews.llvm.org/D157719
More information about the llvm-commits
mailing list