[llvm] [SPIR-V] Improve type inference for a known instruction's builtin: OpGroupAsyncCopy (PR #96895)
Michal Paszkowski via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 23:57:39 PDT 2024
================
@@ -2377,9 +2383,80 @@ static bool generateLoadStoreInst(const SPIRV::IncomingCall *Call,
return true;
}
-/// Lowers a builtin funtion call using the provided \p DemangledCall skeleton
-/// and external instruction \p Set.
namespace SPIRV {
+// Try to find a builtin funtion attributes by a demangled function name and
+// return a tuple <builtin group, op code, ext instruction number>, or a special
+// tuple value <-1, 0, 0> if the builtin funtion is not found.
+// Not all builtin funtions are supported, only those with a ready-to-use op
+// code or instruction number defined in TableGen.
+// TODO: consider a major rework of mapping demangled calls into a builtin
----------------
michalpaszkowski wrote:
Just a comment, not necessary to address right now, we might be able to implement this mapping function directly in the TableGen and expose as a lookup function. Though I am not totally sure.
https://github.com/llvm/llvm-project/pull/96895
More information about the llvm-commits
mailing list