summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-11-06 10:26:27 -0800
committerGitHub <noreply@github.com>2020-11-06 10:26:27 -0800
commit444ff4d8fdeb721b94a9424d03c162f43fb217c9 (patch)
tree7896e00e223d9b1a66a8479f510e60136c5713c3 /source/slang/slang-ir.cpp
parent94861d5d8afdf216c0a507af24fdbe9fda4b66d7 (diff)
Specialize witness table lookups. (#1596)
* Specialize witness table lookups. * Remove generated files from vcxproj * Fix call to generic interface methods.
Diffstat (limited to 'source/slang/slang-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index 30790af84..5bc289dab 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -2596,6 +2596,16 @@ namespace Slang
(IRInst* const*)&baseType);
}
+ IRWitnessTableIDType* IRBuilder::getWitnessTableIDType(
+ IRType* baseType)
+ {
+ return (IRWitnessTableIDType*)findOrEmitHoistableInst(
+ nullptr,
+ kIROp_WitnessTableIDType,
+ 1,
+ (IRInst* const*)&baseType);
+ }
+
IRConstantBufferType* IRBuilder::getConstantBufferType(IRType* elementType)
{
IRInst* operands[] = { elementType };
@@ -5496,6 +5506,7 @@ namespace Slang
case kIROp_DefaultConstruct:
case kIROp_Specialize:
case kIROp_lookup_interface_method:
+ case kIROp_GetSequentialID:
case kIROp_getAddr:
case kIROp_GetValueFromExistentialBox:
case kIROp_Construct: