[Mlir-commits] [mlir] [MLIR][pass registry] show overlapping pass pipeline name (PR #70167)
Maksim Levental
llvmlistbot at llvm.org
Tue Oct 24 22:54:07 PDT 2023
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/70167
>From 94aa46b9998180719c65285d50ed7bc689ec311c Mon Sep 17 00:00:00 2001
From: max <maksim.levental at gmail.com>
Date: Wed, 25 Oct 2023 00:50:56 -0500
Subject: [PATCH 1/2] [MLIR][pass registry] show overlapping pass
---
mlir/lib/Pass/PassRegistry.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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;
}
>From 7f31cf84e801ef14cbd3e27fbde2befa437e450a Mon Sep 17 00:00:00 2001
From: max <maksim.levental at gmail.com>
Date: Wed, 25 Oct 2023 00:53:55 -0500
Subject: [PATCH 2/2] format
---
mlir/lib/Pass/PassRegistry.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp
index 064c08186f2cf95..bb8f2ec759dcaf6 100644
--- a/mlir/lib/Pass/PassRegistry.cpp
+++ b/mlir/lib/Pass/PassRegistry.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include <utility>
#include <optional>
+#include <utility>
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
More information about the Mlir-commits
mailing list