[Mlir-commits] [mlir] 133156c - [mlir][inliner] Assert that no external nodes passed to the profitability hook. (#85489)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Apr 2 12:50:36 PDT 2024
Author: Slava Zakharin
Date: 2024-04-02T12:50:32-07:00
New Revision: 133156c1380ef592ad0fb2dd44473f583dbee1b7
URL: https://github.com/llvm/llvm-project/commit/133156c1380ef592ad0fb2dd44473f583dbee1b7
DIFF: https://github.com/llvm/llvm-project/commit/133156c1380ef592ad0fb2dd44473f583dbee1b7.diff
LOG: [mlir][inliner] Assert that no external nodes passed to the profitability hook. (#85489)
Fixes #85400
Added:
Modified:
mlir/lib/Transforms/InlinerPass.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Transforms/InlinerPass.cpp b/mlir/lib/Transforms/InlinerPass.cpp
index 43ca5cac8b76f3..04b2f9e4191877 100644
--- a/mlir/lib/Transforms/InlinerPass.cpp
+++ b/mlir/lib/Transforms/InlinerPass.cpp
@@ -105,10 +105,7 @@ static bool isProfitableToInline(const Inliner::ResolvedCall &resolvedCall,
Region *callerRegion = resolvedCall.sourceNode->getCallableRegion();
Region *calleeRegion = resolvedCall.targetNode->getCallableRegion();
- // We should not get external nodes here, but just return true
- // for now to preserve the original behavior of the inliner pass.
- if (!callerRegion || !calleeRegion)
- return true;
+ assert(calleeRegion && callerRegion && "unexpected external node");
auto countOps = [](Region *region) {
unsigned count = 0;
More information about the Mlir-commits
mailing list