[llvm] [SPIRV] Emitting DebugSource, DebugCompileUnit (PR #97558)
Michal Paszkowski via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 19:30:30 PDT 2024
michalpaszkowski wrote:
>> As discussed earlier, can you please implement this new pass for NonSemantic Shader DebugInfo as an optional pass (e.g., return immediately if a command-line option is not specified). This means that the pass doesn’t run by default and on-going development of this extension does not impact anybody. Thank you!
>I don't agree.
>The extension is "Non Semantic" so, in SPIR-V vocabulary, means that's not influencing executable code. If it's than it's a bug. The all steps of the implementation should be a valid SPIR-V verifiable by spirv-val. If you have debug info inside the IR the non_semantic should run as a default, if you don't have then nothing should happen. If you don't have enabled correct extension it should throw.
I do agree with you @bwlodarcz and ultimately the pass should be enabled by default. However, I would still please ask you to make the pass optional (and disabled by default) for now, until we reach similar support for all debug info as the translator. The reason is that some compilers, including IGC, take hints from the metadata e.g. for choosing builtin functions (please see PR 1951 in SPIR-V Translator repository) for one example of such issue. I would like to make sure that the SPIR-V we generate here works without the metadata and in cases where it does not, it will not mask those issues. Later, as those issues are addressed in the SPIR-V consumers, I would envision to have this pass enabled by default and have an option to disable it -- since this might be quite handy.
https://github.com/llvm/llvm-project/pull/97558
More information about the llvm-commits
mailing list