[Mlir-commits] [mlir] [MLIR][pass registry] show overlapping pass (PR #70167)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Oct 24 22:52:45 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core
Author: Maksim Levental (makslevental)
<details>
<summary>Changes</summary>
Similar to https://github.com/llvm/llvm-project/pull/70108.
---
Full diff: https://github.com/llvm/llvm-project/pull/70167.diff
1 Files Affected:
- (modified) mlir/lib/Pass/PassRegistry.cpp (+4-1)
``````````diff
diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp
index 3d10fe14d43d9ef..064c08186f2cf95 100644
--- a/mlir/lib/Pass/PassRegistry.cpp
+++ b/mlir/lib/Pass/PassRegistry.cpp
@@ -99,7 +99,10 @@ void mlir::registerPassPipeline(
PassPipelineInfo pipelineInfo(arg, description, function,
std::move(optHandler));
bool inserted = passPipelineRegistry->try_emplace(arg, pipelineInfo).second;
- assert(inserted && "Pass pipeline registered multiple times");
+#ifndef NDEBUG
+ if (!inserted)
+ report_fatal_error("Pass pipeline " + arg + " registered multiple times");
+#endif
(void)inserted;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/70167
More information about the Mlir-commits
mailing list