[PATCH] D136267: [AMDGPU] Speedup GCNDownwardRPTracker::advanceBeforeNext
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 10:37:26 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/GCNRegPressure.cpp:345-346
+ continue;
+ if (SeenRegs.end() != find(SeenRegs, MO.getReg()))
+ continue;
+ SeenRegs.push_back(MO.getReg());
----------------
vpykhtin wrote:
> arsenm wrote:
> > Might as well use SmallSetVector?
> It's only used to avoid visiting already seen registers, so this is more like a set, not vector. I'm just not sure if it worth to use some kind of hashing sets here because the number of registers is usually small and it seems it may be faster to use just plain vector. I don't have strong opinion here, however.
Then SmallSet or SmallSet vector. Both do the linear scan when the set is small
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136267/new/
https://reviews.llvm.org/D136267
More information about the llvm-commits
mailing list