[Mlir-commits] [mlir] 2d3eb49 - [mlir][vulkan-runner] Fix createLowerToLLVMPass interface

Lei Zhang llvmlistbot at llvm.org
Tue Apr 7 09:56:45 PDT 2020


Author: Lei Zhang
Date: 2020-04-07T12:54:54-04:00
New Revision: 2d3eb493d418c415b9d204afd5fb9e5ff8eeec99

URL: https://github.com/llvm/llvm-project/commit/2d3eb493d418c415b9d204afd5fb9e5ff8eeec99
DIFF: https://github.com/llvm/llvm-project/commit/2d3eb493d418c415b9d204afd5fb9e5ff8eeec99.diff

LOG: [mlir][vulkan-runner] Fix createLowerToLLVMPass interface

createLowerToLLVMPass() now requires a struct for passing in arguments
after 7023f4b4cb0157d95d98f32ace247acd9fc7b80a.

Added: 
    

Modified: 
    mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
index 10987f6939ca..b077a887bf9d 100644
--- a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
+++ b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
@@ -40,9 +40,11 @@ static LogicalResult runMLIRPasses(ModuleOp module) {
   modulePM.addPass(spirv::createLowerABIAttributesPass());
   modulePM.addPass(spirv::createUpdateVersionCapabilityExtensionPass());
   passManager.addPass(createConvertGpuLaunchFuncToVulkanLaunchFuncPass());
-  passManager.addPass(createLowerToLLVMPass(/*useAlloca=*/false,
-                                            /*useBarePtrCallConv=*/false,
-                                            /*emitCWrappers=*/true));
+  LowerToLLVMOptions llvmOptions = {
+      /*useBarePtrCallConv =*/false,
+      /*emitCWrappers = */ true,
+      /*indexBitwidth =*/kDeriveIndexBitwidthFromDataLayout};
+  passManager.addPass(createLowerToLLVMPass(llvmOptions));
   passManager.addPass(createConvertVulkanLaunchFuncToVulkanCallsPass());
   return passManager.run(module);
 }


        


More information about the Mlir-commits mailing list