skia2/resources/sksl/inliner
John Stiles 05c41162fb Allow inlining of functions with unassigned out-params.
Our inliner would ignore any functions with `inout` parameters, because
inlining them properly was more complex than just leaving the function
call. However, real-world code can sometimes contain helper functions
that have `inout` params that are never used at all (e.g. an uber-shader
with some features turned off).

We now read the ProgramUsage and check to see whether or not the
`inout`-qualified parameter is actually modified. If it's never changed,
the function now remains a candidate for inlining.

Change-Id: I92e494f94cc070801cb9aa28bd13faa689b806b6
Bug: skia:12636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470299
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-11-11 19:33:06 +00:00
..
DoWhileBodyMustBeInlinedIntoAScope.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
DoWhileTestCannotBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
ExponentialGrowth.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForBodyMustBeInlinedIntoAScope.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
ForInitializerExpressionsCanBeInlined.sksl Loosen ES3 restrictions in Runtime Effects for debugging. 2021-04-28 19:59:36 +00:00
ForWithoutReturnInsideCanBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
ForWithReturnInsideCannotBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
IfBodyMustBeInlinedIntoAScope.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
IfElseBodyMustBeInlinedIntoAScope.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
IfElseChainWithReturnsCanBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
IfTestCanBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
IfWithReturnsCanBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlineKeywordOverridesThreshold.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlinerAvoidsVariableNameOverlap.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlinerCanBeDisabled.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerElidesTempVarForReturnsInsideBlock.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlinerHonorsGLSLOutParamSemantics.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlinerManglesNames.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlinerUsesTempVarForMultipleReturns.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlinerUsesTempVarForReturnsInsideBlockWithVar.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlineThreshold.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlineWithInoutArgument.sksl Allow inlining of functions with unassigned out-params. 2021-11-11 19:33:06 +00:00
InlineWithModifiedArgument.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlineWithNestedBigCalls.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlineWithNestedCalls.sksl Disallow inlining a function with out-parameters. 2021-03-17 18:04:00 +00:00
InlineWithUnmodifiedArgument.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
InlineWithUnnecessaryBlocks.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
NoInline.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
Ossfuzz37994.sksl Fix inliner bug discovered by fuzzer. 2021-09-07 13:29:37 +00:00
ShortCircuitEvaluationsCannotInlineRightHandSide.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
StaticSwitch.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
StructsCanBeInlinedSafely.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
SwitchWithCastCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
SwitchWithoutReturnInsideCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
SwizzleCanBeInlinedDirectly.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
TernaryResultsCannotBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
TernaryTestCanBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
TrivialArgumentsInlineDirectly.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
WhileBodyMustBeInlinedIntoAScope.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00
WhileTestCannotBeInlined.sksl Reland "Add coords parameter to all .sksl test files used as runtime effects" 2021-04-27 20:47:31 +00:00