Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Perron <stevenperron@google.com>2022-03-07 20:45:17 +0300
committerGitHub <noreply@github.com>2022-03-07 20:45:17 +0300
commit920156cf183baa11f6b65d159da6fba9fdab684e (patch)
tree712531eb825661f1eae11741e098fe7066120278 /include
parent273d2a45adda86c0a4299032dc9e71b270373739 (diff)
Add pass to remove DontInline function control (#4747)
Swift shader needs a way to inline all functions, even those marked as DontInline. See https://github.com/KhronosGroup/SPIRV-Tools/pull/4471. This implements the suggestion I made in the PR. We add a pass that will remove the DontInline function control, so that the inlining passes will inline them. SwiftShader will still have to modify their code to add this pass before the other passes are run.
Diffstat (limited to 'include')
-rw-r--r--include/spirv-tools/optimizer.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/spirv-tools/optimizer.hpp b/include/spirv-tools/optimizer.hpp
index fdb2e648f..2273e85df 100644
--- a/include/spirv-tools/optimizer.hpp
+++ b/include/spirv-tools/optimizer.hpp
@@ -896,6 +896,10 @@ Optimizer::PassToken CreateConvertToSampledImagePass(
const std::vector<opt::DescriptorSetAndBinding>&
descriptor_set_binding_pairs);
+// Creates a remove-dont-inline pass to remove the |DontInline| function control
+// from every function in the module. This is useful if you want the inliner to
+// inline these functions some reason.
+Optimizer::PassToken CreateRemoveDontInlinePass();
} // namespace spvtools
#endif // INCLUDE_SPIRV_TOOLS_OPTIMIZER_HPP_