1a49a5334c
Early returns can cause the inliner to generate suboptimal code. We control our built-ins, so let's avoid them where we can. Patterns like this challenge the inliner: if (x) return y; return z; But this can be replaced by equivalent code that inlines better: return x ? y : z; Or, if a ternary can't be used, this also does a better job: if (x) return y; else return z; In several cases, this allows the inliner to avoid generating a do-while(false) block for control flow. Change-Id: I921c929122297c40476ff15b4da631fc1581e308 Bug: skia:10737 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318211 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> |
||
---|---|---|
.. | ||
golden | ||
BlendClear.sksl | ||
BlendColor.sksl | ||
BlendColorBurn.sksl | ||
BlendColorDodge.sksl | ||
BlendDarken.sksl | ||
BlendDifference.sksl | ||
BlendDst.sksl | ||
BlendDstAtop.sksl | ||
BlendDstIn.sksl | ||
BlendDstOut.sksl | ||
BlendDstOver.sksl | ||
BlendExclusion.sksl | ||
BlendHardLight.sksl | ||
BlendHue.sksl | ||
BlendLighten.sksl | ||
BlendLuminosity.sksl | ||
BlendModulate.sksl | ||
BlendMultiply.sksl | ||
BlendOverlap.sksl | ||
BlendPlus.sksl | ||
BlendSaturation.sksl | ||
BlendScreen.sksl | ||
BlendSoftLight.sksl | ||
BlendSrc.sksl | ||
BlendSrcAtop.sksl | ||
BlendSrcIn.sksl | ||
BlendSrcOut.sksl | ||
BlendSrcOver.sksl | ||
BlendXor.sksl |