Skip to content

Commit 133156c

Browse files
authored
[mlir][inliner] Assert that no external nodes passed to the profitability hook. (#85489)
Fixes #85400
1 parent 13be0d4 commit 133156c

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
@@ -105,10 +105,7 @@ static bool isProfitableToInline(const Inliner::ResolvedCall &resolvedCall,
105105
Region *callerRegion = resolvedCall.sourceNode->getCallableRegion();
106106
Region *calleeRegion = resolvedCall.targetNode->getCallableRegion();
107107

108-
// We should not get external nodes here, but just return true
109-
// for now to preserve the original behavior of the inliner pass.
110-
if (!callerRegion || !calleeRegion)
111-
return true;
108+
assert(calleeRegion && callerRegion && "unexpected external node");
112109

113110
auto countOps = [](Region *region) {
114111
unsigned count = 0;

0 commit comments

Comments
 (0)