We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da02cd0 commit 3136218Copy full SHA for 3136218
lib/SILOptimizer/Transforms/PerformanceInliner.cpp
@@ -1151,8 +1151,11 @@ void SILPerformanceInliner::collectAppliesToInline(
1151
// caller block limit at this point. In such a case, we continue. This
1152
// will ensure that any further non inline always functions are skipped,
1153
// but we /do/ inline any inline_always functions remaining.
1154
- if (NumCallerBlocks > OverallCallerBlockLimit)
+ if (NumCallerBlocks > OverallCallerBlockLimit &&
1155
+ // Still allow inlining of small functions.
1156
+ !hasMaxNumberOfBasicBlocks(Callee, 8)) {
1157
continue;
1158
+ }
1159
1160
// Otherwise, calculate our block weights and determine if we want to
1161
// inline this.
0 commit comments