[llvm] [SPIRV] Support for SPV_INTEL_fpga_reg extension (PR #134352)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Tue May 6 06:58:28 PDT 2025
================
@@ -238,6 +238,22 @@ static SmallVector<Metadata *> parseAnnotation(Value *I,
: SmallVector<Metadata *>{};
}
+static bool lowerAnnotation(IntrinsicInst *II) {
+ std::string Anno =
+ getAnnotation(II->getArgOperand(1),
+ 4 < II->arg_size() ? II->getArgOperand(4) : nullptr);
+ if (Anno == "__builtin_intel_fpga_reg") {
----------------
MrSidims wrote:
This is an internal builtin used in https://github.com/intel/llvm , so if you really want to use it in SPIR-V backend, then probably it should be upstreamed to LLVM itself. Depending on your goals it is also worth considering to step away from intel/llvm and llvm-spirv implementation and instead represent fpga_reg as an intrinsic function, leaving the compiler's frontend to emit it.
If you could help with understanding your upstreaming efforts - may be a can give some suggestions.
https://github.com/llvm/llvm-project/pull/134352
More information about the llvm-commits
mailing list