[Mlir-commits] [mlir] 0524a09 - [mlir] Tune error message for assertion.

Sean Silva llvmlistbot at llvm.org
Mon Mar 22 18:11:00 PDT 2021


Author: Sean Silva
Date: 2021-03-22T18:10:18-07:00
New Revision: 0524a09cc7e1a0797982feacf505825231efbee7

URL: https://github.com/llvm/llvm-project/commit/0524a09cc7e1a0797982feacf505825231efbee7
DIFF: https://github.com/llvm/llvm-project/commit/0524a09cc7e1a0797982feacf505825231efbee7.diff

LOG: [mlir] Tune error message for assertion.

This assertion can fire in the case of different contexts as well, which
is not difficult to do from Python bindings, for example.

Added: 
    

Modified: 
    mlir/lib/Pass/Pass.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Pass/Pass.cpp b/mlir/lib/Pass/Pass.cpp
index 7e9e3b569962..3f1f8ec0a7d0 100644
--- a/mlir/lib/Pass/Pass.cpp
+++ b/mlir/lib/Pass/Pass.cpp
@@ -864,7 +864,8 @@ void PassManager::enableVerifier(bool enabled) { verifyPasses = enabled; }
 LogicalResult PassManager::run(Operation *op) {
   MLIRContext *context = getContext();
   assert(op->getName().getIdentifier() == getOpName(*context) &&
-         "operation has a 
diff erent name than the PassManager");
+         "operation has a 
diff erent name than the PassManager or is from a "
+         "
diff erent context");
 
   // Before running, make sure to coalesce any adjacent pass adaptors in the
   // pipeline.


        


More information about the Mlir-commits mailing list