diff options
| author | Gangzheng Tong <tonggangzheng@gmail.com> | 2025-05-09 02:00:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-09 09:00:39 +0000 |
| commit | 5e5c08dc5ddf7989faf2f9f8ad76e260ba6385d7 (patch) | |
| tree | d4ee22cdbbb81c5e9c962880fc0a6ae849d75293 | |
| parent | 8a542dfffca7633707cb4b5e6ac007c4523778f8 (diff) | |
Destroy unused witness table after hoisting (#7009)
* Destroy unused witness table after hoisting
| -rw-r--r-- | source/slang/slang-ir-autodiff.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir-autodiff.cpp b/source/slang/slang-ir-autodiff.cpp index f70e30b72..6ad8c5dbb 100644 --- a/source/slang/slang-ir-autodiff.cpp +++ b/source/slang/slang-ir-autodiff.cpp @@ -3249,6 +3249,9 @@ struct AutoDiffPass : public InstPassBase } } + // Destroy the old witness table + innerResult.diffWitness->replaceUsesWith(newWitnessTable); + innerResult.diffWitness->removeAndDeallocate(); result.diffWitness = hoistValueFromGeneric(builder, newWitnessTable, specInst, true); } |
