The wave barrier represents the discardable barrier. Its main purpose is to carry convergent attribute, thus preventing illegal CFG optimizations.
All lanes in a wave come to convergence point simultaneously with SIMT, thus no special instruction is needed in the ISA.
The barrier is discarded during code generation.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This also needs a corresponding convergent pseudoinstruction otherwise machine CFG changes could do the same things
include/llvm/IR/IntrinsicsAMDGPU.td | ||
---|---|---|
110 | There is no scalar instruction, so this should drop the _s_ |
lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
903–906 ↗ | (On Diff #77851) | Does it matter that Post-RA scheduler runs after the Post-RA Pseudo Expansion pass? |
lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
903–906 ↗ | (On Diff #77851) | I do not think that is important. Scheduler will not move an instruction to a non-equivalent control flow block. |
lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
903–906 ↗ | (On Diff #77851) | I think this should be emitted in the asm printer as a comment rather than deleting it during codegen passes |
lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
142 | If it does not have SALU, then it is VALU, and that is what happens:
I have added it to SIInstrInfo::getInstSizeInBytes() instead. |
There is no scalar instruction, so this should drop the _s_