[Mlir-commits] [mlir] 443e562 - [mlir] Fix ignoring return value warning.

Adrian Kuegel llvmlistbot at llvm.org
Sun Apr 2 23:28:04 PDT 2023


Author: Adrian Kuegel
Date: 2023-04-03T08:27:29+02:00
New Revision: 443e562f3645d2954469968e6bfe44f03564bb71

URL: https://github.com/llvm/llvm-project/commit/443e562f3645d2954469968e6bfe44f03564bb71
DIFF: https://github.com/llvm/llvm-project/commit/443e562f3645d2954469968e6bfe44f03564bb71.diff

LOG: [mlir] Fix ignoring return value warning.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp b/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
index e732e5dd9bedf..0d7a342a7d27a 100644
--- a/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
+++ b/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
@@ -79,7 +79,8 @@ static LogicalResult runMLIRPasses(Operation *module,
                                    JitRunnerOptions &options) {
   PassManager passManager(module->getContext(),
                           module->getName().getStringRef());
-  applyPassManagerCLOptions(passManager);
+  if (failed(applyPassManagerCLOptions(passManager)))
+    return failure();
   passManager.addPass(createGpuKernelOutliningPass());
   passManager.addPass(createConvertGPUToSPIRVPass(/*mapMemorySpace=*/true));
 

diff  --git a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
index ccf6c3775239b..c5e16f57af7ca 100644
--- a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
+++ b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
@@ -57,7 +57,8 @@ static LogicalResult runMLIRPasses(Operation *op,
   if (!module)
     return op->emitOpError("expected a 'builtin.module' op");
   PassManager passManager(module.getContext());
-  applyPassManagerCLOptions(passManager);
+  if (failed(applyPassManagerCLOptions(passManager)))
+    return failure();
 
   passManager.addPass(createGpuKernelOutliningPass());
   passManager.addPass(memref::createFoldMemRefAliasOpsPass());


        


More information about the Mlir-commits mailing list