diff options
| author | Yong He <yonghe@outlook.com> | 2023-10-09 14:03:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-09 14:03:43 -0700 |
| commit | 67e186f0169591c48d24bd8ff7e4e4e715e8fa45 (patch) | |
| tree | 9b46dc35145d18d5b25d9b3b16759c9b7343615c /source/slang/slang-ir-inline.cpp | |
| parent | 17c7163c2ae8fc290e70b43d8700b68ef18b1ee1 (diff) | |
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 <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-inline.cpp')
| -rw-r--r-- | source/slang/slang-ir-inline.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
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<IREntryPointDecoration>()) - return true; - return false; - } -}; - -void performSpirvInlining(IRModule* module) -{ - SLANG_PROFILE; - while (true) - { - SpirvInliningPass pass(module); - if (pass.considerAllCallSites()) - continue; - break; - } -} - } // namespace Slang |
