345d72124d
When we determine that a function only contains a single return statement, there is no need to create a temporary variable and store the result expression into a variable. Instead, we can directly replace the function-call expression with the return-statement's expression. This dramatically simplifies the final optimized output from chains of very simple inlined functions, which is a very common pattern for trees of Skia fragment processors. Change-Id: I6789064a321daf43db2e1cef4915f25ed74d6131 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344665 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> |
||
---|---|---|
.. | ||
golden | ||
AbsInt.sksl | ||
BlendGuardedDivide.sksl | ||
BlendModesAllZeroVec.sksl | ||
FractNegative.sksl | ||
FragCoords.sksl | ||
LoopCondition.sksl | ||
MinAndAbsTogether.sksl | ||
NegatedAtan.sksl | ||
PowWithConstantExponent.sksl | ||
RewriteDoWhileLoops.sksl | ||
TernaryShortCircuit.sksl |