diff options
| author | Yong He <yonghe@outlook.com> | 2023-06-26 15:18:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-26 15:18:06 -0700 |
| commit | 4c9e4de4b68f2612a39e8783e9da89605ecf54e0 (patch) | |
| tree | 83a8efcc45d3d67d07f18caad49a9469252bf509 /source/slang/slang-ir-simplify-cfg.cpp | |
| parent | 4eef0424a657e19f51f2734ba0199b69ee7354bd (diff) | |
Fix DCE on mutable calls in a loop. (#2943)
* Fix DCE on mutable calls in a loop.
* More accurate in-loop test.
* code review fixes.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-simplify-cfg.cpp')
| -rw-r--r-- | source/slang/slang-ir-simplify-cfg.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-ir-simplify-cfg.cpp b/source/slang/slang-ir-simplify-cfg.cpp index c37284dce..0c068bc66 100644 --- a/source/slang/slang-ir-simplify-cfg.cpp +++ b/source/slang/slang-ir-simplify-cfg.cpp @@ -742,6 +742,12 @@ static bool processFunc(IRGlobalValueWithCode* func) if (!blocksRemoved) break; } + if (changed) + { + auto module = func->getModule(); + if (module) + module->invalidateAnalysisForInst(func); + } return changed; } |
