skia2/resources/sksl/inliner
John Stiles bff24abab8 Disallow inlining a function with out-parameters.
It is difficult to do this both efficiently and correctly while honoring
GLSL semantics (which require the lvalues to be kept distinct, even when
they point to the same variable). We could make it work by making copies
of every out parameter in each direction (going in for inouts, and
coming out for outs and inouts).

However, this could be self-defeating if it makes it harder for the
driver to track variable lifetimes. Simply opting out of inlining these
functions entirely seems like the best tradeoff; let the driver optimize
them if it can, and we can enjoy reduced complexity in the SkSL inliner.

Change-Id: I62f7b4550cc181cfe789e4f2ff4e408ba1baf9cb
Bug: skia:11326
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370257
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-17 18:04:00 +00:00
..
DoWhileBodyMustBeInlinedIntoAScope.sksl
DoWhileTestCannotBeInlined.sksl
EnumsCanBeInlinedSafely.sksl
ExponentialGrowth.sksl
ForBodyMustBeInlinedIntoAScope.sksl
ForInitializerExpressionsCanBeInlined.sksl
ForWithoutReturnInsideCanBeInlined.sksl
ForWithReturnInsideCannotBeInlined.sksl
IfBodyMustBeInlinedIntoAScope.sksl
IfElseBodyMustBeInlinedIntoAScope.sksl
IfElseChainWithReturnsCanBeInlined.sksl
IfTestCanBeInlined.sksl
IfWithReturnsCanBeInlined.sksl
InlineKeywordOverridesThreshold.sksl Disallow inlining a function with out-parameters. 2021-03-17 18:04:00 +00:00
InlinerAvoidsVariableNameOverlap.sksl
InlinerCanBeDisabled.sksl
InlinerElidesTempVarForReturnsInsideBlock.sksl
InlinerHonorsGLSLOutParamSemantics.sksl
InlinerManglesNames.sksl
InlinerUsesTempVarForMultipleReturns.sksl
InlinerUsesTempVarForReturnsInsideBlockWithVar.sksl
InlineThreshold.sksl
InlineWithInoutArgument.sksl Disallow inlining a function with out-parameters. 2021-03-17 18:04:00 +00:00
InlineWithModifiedArgument.sksl
InlineWithNestedBigCalls.sksl
InlineWithNestedCalls.sksl Disallow inlining a function with out-parameters. 2021-03-17 18:04:00 +00:00
InlineWithUnmodifiedArgument.sksl
InlineWithUnnecessaryBlocks.sksl
NoInline.sksl Add noinline keyword to SkSL. 2021-03-10 15:39:48 +00:00
ShortCircuitEvaluationsCannotInlineRightHandSide.sksl
StaticSwitch.sksl Eliminate control-flow analysis. 2021-03-11 13:24:54 +00:00
StructsCanBeInlinedSafely.sksl
SwitchWithCastCanBeInlined.sksl
SwitchWithoutReturnInsideCanBeInlined.sksl
SwizzleCanBeInlinedDirectly.sksl Disallow inlining a function with out-parameters. 2021-03-17 18:04:00 +00:00
TernaryResultsCannotBeInlined.sksl
TernaryTestCanBeInlined.sksl
TrivialArgumentsInlineDirectly.sksl Disallow inlining a function with out-parameters. 2021-03-17 18:04:00 +00:00
WhileBodyMustBeInlinedIntoAScope.sksl
WhileTestCannotBeInlined.sksl