- Relax the AsmParser to accept .amdhsa_wavefront_size32 0 when the .amdhsa_shared_vgpr_count directive is present.
- Teach the KD disassembler to respect the setting of KERNEL_CODE_PROPERTY_ENABLE_WAVEFRONT_SIZE32 when calculating the value of .amdhsa_next_free_vgpr.
- Teach the KD disassembler to disassemble COMPUTE_PGM_RSRC3 for gfx90a and gfx10+.
- Include "pseudo directive" comments for gfx10 fields which are not controlled by any assembler directive.
- Fix disassembleObject failure diagnostic in llvm-objdump to not hard-code a comment string, and to follow the convention of not capitalizing the first sentence.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
1686 | diagnostics are recommended not to be capitalized. llvm-objdump sticks with this convention quite well: https://llvm.org/docs/CodingStandards.html#error-and-warning-messages |
llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp | ||
---|---|---|
1978 | the cast is redundant. | |
llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx10.s | ||
4 | When there are multiple files, consider: ; RUN: rm -rf %t && split-file %s %t && cd %t then just use relative filenames below (remove all %t) | |
7 | In several test/tools, the convention is to place | at the end of the previous line and indent the continuation line(s) by 2 spaces. |
llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h | ||
---|---|---|
101 | I think using Optional is appropriate. The .amdhsa_wavefront_size32 directive and consequently EnableWavefrontSize32 here are specific to GFX10-11. Otherwise that bit is reserved and must be 0 for older hardware. |
llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h | ||
---|---|---|
101 | Right, like Ronak says the nominal type for this parameter to AMDGPU::IsaInfo::getVGPREncodingGranule is Optional<bool>, and using plain bool here would be assuming some details about the implementation in IsaInfo for limited benefit |
Rebase
llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx10.s | ||
---|---|---|
4 | In working on the NFC portion separately the rm -rf %t portion didn't seem to have a clear use, and was present in ~40% of the uses of split-file, so I removed it. Is there a particular reason to include it? |
llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx10.s | ||
---|---|---|
4 | I don't know if this is what @MaskRay has in mind, but failure to delete the folder would mean stale files being left around, if the test is ever changed, potentially leading to surprising behaviour. It's also typically necessary for llvm-ar invocations, although that doesn't seem relevant here. |
Can this be a plain bool?