[llvm] [SPIRV] Added support for extension SPV_INTEL_fpga_buffer_location (PR #133679)

via llvm-commits llvm-commits at lists.llvm.org
Sun May 11 23:16:11 PDT 2025


================
@@ -362,7 +362,14 @@ bool SPIRVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
         for (SPIRV::Decoration::Decoration Decoration : ArgTypeQualDecs)
           buildOpDecorate(VRegs[i][0], MIRBuilder, Decoration, {});
       }
-
+      if (MDNode *Node = F.getMetadata("kernel_arg_buffer_location")) {
+        int64_t BufferLoc =
+            processKernelArgBufferLocation(F, Node, i, VRegs, -1);
+        if (BufferLoc != -1)
+          buildOpDecorate(VRegs[i][0], MIRBuilder,
+                          SPIRV::Decoration::BufferLocationINTEL,
+                          {static_cast<uint32_t>(BufferLoc)});
+      }
----------------
swatheesh-mcw wrote:

Add an empty line here

https://github.com/llvm/llvm-project/pull/133679


More information about the llvm-commits mailing list