summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-dce.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-dce.cpp')
-rw-r--r--source/slang/slang-ir-dce.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-ir-dce.cpp b/source/slang/slang-ir-dce.cpp
index d58e307da..7d677b488 100644
--- a/source/slang/slang-ir-dce.cpp
+++ b/source/slang/slang-ir-dce.cpp
@@ -361,6 +361,13 @@ bool shouldInstBeLiveIfParentIsLive(IRInst* inst, IRDeadCodeEliminationOptions o
case kIROp_WitnessTableEntry:
return true;
+ // Special dictionaries used for differentiable type tracking
+ // should be kept alive. These are removed by the auto-diff pass,
+ // once they are used.
+ case kIROp_DifferentiableTypeDictionaryItem:
+ case kIROp_DifferentiableTypeDictionary:
+ return true;
+
default:
break;
}