IsSourceOfDivergence and IsAlwaysUniform can be set to 1 to mark instructions
which are inherently divergent or uniform. Adding them to Readlane and
Writelane instruction for now. To be extended to all required instructions.
Details
- Reviewers
arsenm nhaehnle sameerds foad - Group Reviewers
Restricted Project - Commits
- rGcde2f330b36f: [AMDGPU] Introduce never uniform bit field in tablegen
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/SIDefines.h | ||
---|---|---|
137–138 | Now would be a good time to adopt the name "IsNeverUniform" instead of "IsSourceOfDivergence", to match the InstructionUniformity enum (https://llvm.org/doxygen/namespacellvm.html#ae58c751054b01f206f9b9e34e461d25f) |
I’m not sure we really need a bit for just these 3 cases
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
8422 | Space after if |
At least for divergent there are a lot more instructions, atomic buffers, flat atomics, some lds instructions, etc. Will submit subsequent patches covering them.
llvm/lib/Target/AMDGPU/SIInstrFormats.td | ||
---|---|---|
242 | As we have only very few alwaysUniform instruction, maybe we don't need this to save one bit. |
Addressed review comments
- Using isNeverUniform instead of isSourceOfDivergence.
- Removed the bit for always uniform.
LGTM. But please wait for at least one other reviewer.
Also update the git commit message before submitting
Now would be a good time to adopt the name "IsNeverUniform" instead of "IsSourceOfDivergence", to match the InstructionUniformity enum (https://llvm.org/doxygen/namespacellvm.html#ae58c751054b01f206f9b9e34e461d25f)