Declutter applyPreexistingWaitcnt() a little by abstracting the code
that updates the operands to S_WAITCNT and S_WAITCNT_VSCNT instructions
into discrete functions.
Details
- Reviewers
foad - Commits
- rG69dd9910c7e7: [AMDGPU] Declutter applyPreexistingWaitcnt()
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Looks fine with or without nits addressed.
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | ||
---|---|---|
848 | Slightly neater to return early if they are equal. | |
855 | I know you've copied it from elsewhere but NamedIdx is a terrible name. How about OpName? | |
917 | This could also update the named operand simm16 for consistency. There's no particular rule about whether code like this should look up operand indexes or just hard code them. |
Slightly neater to return early if they are equal.