skia2/tests/sksl/inliner
John Stiles 9b9415e0f1 Avoid inlining functions that are called repeatedly.
Previously, we'd gauge suitability for inlining by counting the nodes in
a function; past a certain limit, the function was considered "too big."

Now, we also incorporate the number of times that function is called.
So if a function is called three times, and its size is 20 nodes, it
would be considered to have an inlining cost of 60 (3 * 20) instead of
20.

This should tamp down the aggressive nature of the inliner in cases like
gaussian convolution or complicated blends, and will hopefully satisfy
Pinpoint.

No change visible in Nanobench (which doesn't test any of these sorts of
patterns, but certainly inlines things): http://screen/AwD5hkgkEfjVx4g

Change-Id: Ie5e32898245ac854adb9ddd52d87001df6a67125
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337676
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-23 21:51:43 +00:00
..
golden Avoid inlining functions that are called repeatedly. 2020-11-23 21:51:43 +00:00
DoWhileBodyMustBeInlinedIntoAScope.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
DoWhileTestCannotBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
ExponentialGrowth.sksl Stop the inliner after it has inlined 2500 statements in a program. 2020-11-13 23:02:11 +00:00
ForBodyMustBeInlinedIntoAScope.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
ForInitializerExpressionsCanBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
ForWithoutReturnInsideCanBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
ForWithReturnInsideCannotBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
IfBodyMustBeInlinedIntoAScope.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
IfElseBodyMustBeInlinedIntoAScope.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
IfElseChainWithReturnsCanBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
IfTestCanBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
IfWithReturnsCanBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlineKeywordOverridesThreshold.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlinerAvoidsVariableNameOverlap.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlinerCanBeDisabled.sksl Add test for disabling the inliner. 2020-10-12 17:14:07 +00:00
InlinerManglesNames.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlinerWrapsEarlyReturnsWithDoWhileBlock.sksl Fix unit test for InlinerWrapsEarlyReturnsWithDoWhileBlock. 2020-09-18 21:08:52 +00:00
InlineThreshold.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlineWithInoutArgument.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlineWithModifiedArgument.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlineWithNestedBigCalls.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlineWithNestedCalls.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlineWithUnmodifiedArgument.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
InlineWithUnnecessaryBlocks.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
ShortCircuitEvaluationsCannotInlineRightHandSide.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
SwitchWithCastCanBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
SwitchWithoutReturnInsideCanBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
SwitchWithReturnInsideCannotBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
SwizzleCanBeInlinedDirectly.sksl Add new unit tests for SkSL. 2020-09-23 20:30:47 +00:00
TernaryResultsCannotBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
TernaryTestCanBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
TrivialArgumentsInlineDirectly.sksl Inline trivial single-argument constructors directly. 2020-09-30 17:06:14 +00:00
WhileBodyMustBeInlinedIntoAScope.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00
WhileTestCannotBeInlined.sksl Migrate SkSL inliner tests to golden files. 2020-09-15 15:22:12 +00:00