diff options
| author | Yong He <yonghe@outlook.com> | 2023-01-14 22:50:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-14 22:50:57 -0800 |
| commit | 1c9b33157322751c456bf7abbd386edccf4413c3 (patch) | |
| tree | bbe4d28172a839fb06ac4b9e8c983a619bf04842 /source/slang/slang-ir-util.cpp | |
| parent | 14fab67c5edd8eb697ffb10dbcc0467678521eef (diff) | |
Support custom backward derivative attribute. (#2594)
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
| -rw-r--r-- | source/slang/slang-ir-util.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp index 73d8865ed..fb465f638 100644 --- a/source/slang/slang-ir-util.cpp +++ b/source/slang/slang-ir-util.cpp @@ -1,6 +1,7 @@ #include "slang-ir-util.h" #include "slang-ir-insts.h" #include "slang-ir-clone.h" +#include "slang-ir-dce.h" namespace Slang { @@ -198,6 +199,7 @@ IRInst* hoistValueFromGeneric(IRBuilder& inBuilder, IRInst* value, IRInst*& outS value->replaceUsesWith(outSpecializedVal); value->removeAndDeallocate(); } + eliminateDeadCode(newGeneric); return newGeneric; } |
