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> |
||
---|---|---|
.. | ||
blend | ||
errors | ||
fp | ||
glsl | ||
inliner | ||
workarounds |