From 67e186f0169591c48d24bd8ff7e4e4e715e8fa45 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 9 Oct 2023 14:03:43 -0700 Subject: Run curated spirv-opt passes through slang-glslang. (#3266) * Run curated spirv-opt passes through slang-glslang. * Cleanup. * Replace spirv-dis downstream compiler with glslang. * delete slang-spirv-opt.cpp. --------- Co-authored-by: Yong He --- source/slang/slang-ir-inline.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'source/slang/slang-ir-inline.cpp') diff --git a/source/slang/slang-ir-inline.cpp b/source/slang/slang-ir-inline.cpp index 3b01d7dde..01dfdc42d 100644 --- a/source/slang/slang-ir-inline.cpp +++ b/source/slang/slang-ir-inline.cpp @@ -1019,33 +1019,4 @@ bool inlineCall(IRCall* call) return pass.considerCallSite(call); } - -struct SpirvInliningPass : InliningPassBase -{ - typedef InliningPassBase Super; - - SpirvInliningPass(IRModule* module) - : Super(module) - {} - - bool shouldInline(CallSiteInfo const& info) - { - if (!info.callee->findDecoration()) - return true; - return false; - } -}; - -void performSpirvInlining(IRModule* module) -{ - SLANG_PROFILE; - while (true) - { - SpirvInliningPass pass(module); - if (pass.considerAllCallSites()) - continue; - break; - } -} - } // namespace Slang -- cgit v1.2.3