[PATCH] D74549: [mlir][spirv] Add pass ConvertGpuLaunchFuncToVulkanCallsPass.

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 08:06:26 PST 2020


antiagainst accepted this revision.
antiagainst added a comment.
This revision is now accepted and ready to land.

Nice, thanks Denis! Reviews already happened in D72696 <https://reviews.llvm.org/D72696> so I just have two more nits here.



================
Comment at: mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp:103
+void GpuLaunchFuncToVulkanCalssPass::runOnModule() {
+  llvmDialect = getContext().getRegisteredDialect<LLVM::LLVMDialect>();
+  initializeCachedTypes();
----------------
Move this into `initializeCachedTypes` or put all of them into the constructor of `GpuLaunchFuncToVulkanCalssPass`?


================
Comment at: mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp:157
+  std::vector<char> shaderName(name.begin(), name.end());
+  shaderName.push_back('\0');
+
----------------
Could you document why we are putting a mysterious `\0` in the middle here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74549





More information about the llvm-commits mailing list