diff options
| author | Yong He <yonghe@outlook.com> | 2023-06-29 17:38:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-29 17:38:46 -0700 |
| commit | 8f269e5fd63e06323b933e958017301b7115b924 (patch) | |
| tree | c08291b6a648d7428f35bcf79f761562efd13b3e /source/slang/slang-emit.cpp | |
| parent | 47d0e8abe4f2fe3c2eede35079676210d1db0b1a (diff) | |
Apply SCCP on global scope before unrolling loops. (#2952)
* Apply SCCP on global scope before unrolling loops.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index b34483cf2..bd6542e2a 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -399,6 +399,9 @@ Result linkAndOptimizeIR( // Unroll loops. if (codeGenContext->getSink()->getErrorCount() == 0) { + applySparseConditionalConstantPropagationForGlobalScope( + irModule, codeGenContext->getSink()); + if (!unrollLoopsInModule(irModule, codeGenContext->getSink())) return SLANG_FAIL; } |
