Skip to content

Commit 140fa83

Browse files
committed
[mlir][inliner] Assert that no external nodes passed to the profitability hook.
Fixes #85400
1 parent 047b2b2 commit 140fa83

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mlir/lib/Transforms/InlinerPass.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ static bool isProfitableToInline(const Inliner::ResolvedCall &resolvedCall,
9696
Region *callerRegion = resolvedCall.sourceNode->getCallableRegion();
9797
Region *calleeRegion = resolvedCall.targetNode->getCallableRegion();
9898

99-
// We should not get external nodes here, but just return true
100-
// for now to preserve the original behavior of the inliner pass.
101-
if (!calleeRegion || !calleeRegion)
102-
return true;
99+
assert(calleeRegion && callerRegion && "unexpected external node");
103100

104101
auto countOps = [](Region *region) {
105102
unsigned count = 0;

0 commit comments

Comments
 (0)