[PATCH] D147732: [AMDGPU] Add type mangling for {read, write, readfirst, perm}lane intrinsics
Jeffrey Byrnes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 10:43:46 PDT 2023
jrbyrnes added a comment.
In D147732#4434557 <https://reviews.llvm.org/D147732#4434557>, @arsenm wrote:
> I think this may not hard break mesa. I believe mesa bypasses the intrinsic creation API, and just declares the string name of the intrinsic. The type name mangling suffix is technically irrelevant, and as long as you use a consistent type with a consistent suffix things should work out (and the null suffix also works). After committing mesa should still move to adding the type suffix
I can echo this sentiment.
The main issues arises when there are untyped calls to CreateIntrinsic, as the intrinsics are no longer defined with a type.
For {read, readfirst, write, perm}lanes, Mesa uses LLVMAddFunction and LLVMBuildCall2 APIs under its own ac_build_intrinsic -- these calls are all typed in the current implementation. Also, (as expected) the implementation inserts bitcasts to cast to Int32Ty before inserting these calls since only that version of the intrinsic currently exists. This also implies they wont have an issue with intrinsic / type declarations.
Unless I have missed something, I don't see why switching to type-mangling would cause an issue with Mesa's current implementation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147732/new/
https://reviews.llvm.org/D147732
More information about the llvm-commits
mailing list