[PATCH] D11885: AMDGPU/SI: Add SI Machine Scheduler
Axel Davy via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 09:47:13 PDT 2015
axeldavy added inline comments.
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:33-34
@@ +32,4 @@
+ }
+ for (unsigned i = 0; i < getNumRegPressureSets(); ++i) {
+ if (strncmp("SGPR_32", getRegPressureSetName(i), 7) == 0)
+ SGPR32SetID = i;
----------------
arsenm wrote:
> Can you do something besides compare the name? If not, this should compare StringRefs or something rather than using the libc functions
Unfortunately I didn't find any other simple way than comparing the names.
There is probably an alternative way which would be have llvm generate variables with the pressure sets names containing their ID, as is done for pressure classes, but I haven't investigated that way.
Something like 'if (StringRefs("SGPR_32") == getRegPressureSetName(i))' ?
http://reviews.llvm.org/D11885
More information about the llvm-commits
mailing list