skia2/tests/sksl/workarounds
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
AbsInt.sksl Migrate several GLSL workaround unit tests to golden files. 2020-09-17 16:41:18 +00:00
BlendGuardedDivide.sksl Add test for sk_Caps.mustGuardDivisionEvenAfterExplicitZeroCheck. 2020-10-09 13:48:13 +00:00
BlendModesAllZeroVec.sksl Add test for sk_Caps.inBlendModesFailRandomlyForAllZeroVec. 2020-10-09 13:44:43 +00:00
FractNegative.sksl Migrate several GLSL workaround unit tests to golden files. 2020-09-17 16:41:18 +00:00
FragCoords.sksl Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
LoopCondition.sksl Migrate several GLSL workaround unit tests to golden files. 2020-09-17 16:41:18 +00:00
MinAndAbsTogether.sksl Migrate several GLSL workaround unit tests to golden files. 2020-09-17 16:41:18 +00:00
NegatedAtan.sksl Migrate several GLSL workaround unit tests to golden files. 2020-09-17 16:41:18 +00:00
PowWithConstantExponent.sksl Migrate several GLSL workaround unit tests to golden files. 2020-09-17 16:41:18 +00:00
RewriteDoWhileLoops.sksl Migrate remaining SkSL GLSL tests to golden outputs. 2020-09-18 19:22:19 +00:00
TernaryShortCircuit.sksl Migrate several GLSL workaround unit tests to golden files. 2020-09-17 16:41:18 +00:00