[PATCH] D76059: [mlir][vulkan-runner] Use C-compatible wrapper emission.

Denis Khalikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 05:53:57 PDT 2020


denis13 added a comment.

This patch eliminates `VulkanLaunchOpOperandAdaptor` and enables `emitCWrappers` while lowering to LLVM dialect. By doing this we follow the official guideline for calling convention https://mlir.llvm.org/docs/ConversionToLLVMDialect/#calling-convention.
`emitCWrappers` enables the following steps:

1. Declares a new function _mlir_ciface_vulkanLaunch where memref arguments are converted to pointer-to-struct and the remaining arguments are converted as usual.
2. Adds a body to the original function (making it non-external) that
  1. allocates a memref descriptor,
  2. populates it, and
  3. passes the pointer to it into the newly declared interface function
  4. collects the result of the call and returns it to the caller.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76059/new/

https://reviews.llvm.org/D76059





More information about the llvm-commits mailing list