From 2d3eb493d418c415b9d204afd5fb9e5ff8eeec99 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 7 Apr 2020 12:53:11 -0400 Subject: [PATCH] [mlir][vulkan-runner] Fix createLowerToLLVMPass interface createLowerToLLVMPass() now requires a struct for passing in arguments after 7023f4b4cb0157d95d98f32ace247acd9fc7b80a. --- mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp index 10987f6..b077a88 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); } -- 2.7.4