[llvm] [SPIR-V] Improve type inference for a known instruction's builtin: OpGroupAsyncCopy (PR #96895)
Vyacheslav Levytskyy via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 01:52:20 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
----------------
VyacheslavLevytskyy wrote:
Yes, I agree that we should consider improving the whole thing. I've been thinking about the same matter when created this PR, so I've added TODO to keep that topic in plans.
https://github.com/llvm/llvm-project/pull/96895
More information about the llvm-commits
mailing list