diff options
Diffstat (limited to 'source/slang/slang-ir-autodiff.cpp')
| -rw-r--r-- | source/slang/slang-ir-autodiff.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/slang/slang-ir-autodiff.cpp b/source/slang/slang-ir-autodiff.cpp index 9075002e0..40dcb1b51 100644 --- a/source/slang/slang-ir-autodiff.cpp +++ b/source/slang/slang-ir-autodiff.cpp @@ -1026,12 +1026,9 @@ IRInst* AutoDiffSharedContext::findDifferentiableInterface() { for (auto globalInst : module->getGlobalInsts()) { - // TODO: This seems like a particularly dangerous way to look for an interface. - // See if we can lower IDifferentiable to a separate IR inst. - // if (auto intf = as<IRInterfaceType>(globalInst)) { - if (auto decor = intf->findDecoration<IRNameHintDecoration>()) + if (auto decor = intf->findDecoration<IRKnownBuiltinDecoration>()) { if (decor->getName() == toSlice("IDifferentiable")) { @@ -1261,7 +1258,7 @@ void DifferentiableTypeConformanceContext::setFunc(IRGlobalValueWithCode* func) } addTypeToDictionary((IRType*)item->getBaseType(), item->getWitness()); - +#if 0 // TODO: Is this really needed? if (!as<IRInterfaceType>(item->getBaseType()) && !as<IRAssociatedType>(item->getBaseType())) @@ -1314,6 +1311,7 @@ void DifferentiableTypeConformanceContext::setFunc(IRGlobalValueWithCode* func) addTypeToDictionary((IRType*)diffType, diffWitness); } } +#endif } } } |
