[PATCH] D136267: [AMDGPU] Speedup GCNDownwardRPTracker::advanceBeforeNext
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 10:36:16 PST 2022
vpykhtin 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());
----------------
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.
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