KhronosGroup / KhronosGroup/SPIRV-LLVM-Translator
SPV_EXT_relaxed_printf_string_address_space allows format from too many address spaces
- Dominant language
- LLVM
- Stars
- 625
- Forks
- 279
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Description
Using --spirv-ext=+SPV_EXT_relaxed_printf_string_address_space allows printf format strings from any address space, but
https://github.com/pjaaskel/SPIRV-Registry/blob/2f4cb5fd64b189f8ab0ddeb770a2b67aade41613/extensions/EXT/SPV_EXT_relaxed_printf_string_address_space.asciidoc
states:
> "format must be a pointer(constant, global, local, private, generic) to i8."
In particular calls like:
`%4 = call spir_func i32 @_Z18__spirv_ocl_printfPU3AS1c(ptr addrspace(1) %3) #0`
are accepted, but addrspace(1) maps to: ATTR_VOLATILE.
Contributor guide
Research direction
Start by comparing the accepted LLVM IR call in the issue with the SPV_EXT_relaxed_printf_string_address_space specification, then locate the translator's validation for printf format-string address spaces. Done means calls using only the specified constant, global, local, private, or generic spaces are accepted and other address spaces are rejected, with regression coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100