diff options
| author | Yong He <yonghe@outlook.com> | 2023-02-16 16:44:04 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-16 16:44:04 -0800 |
| commit | 245466d89cfe54b78da486f06d470bc6daaf4625 (patch) | |
| tree | 522e0af1a9d2756182e143cdc85031ea1bbc2aa0 /source/slang/slang-ir-specialize-dispatch.cpp | |
| parent | 4c4826d47eeef4675daae4ae53ff76f4d5ebd84a (diff) | |
Remove `SharedIRBuilder`. (#2657)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-specialize-dispatch.cpp')
| -rw-r--r-- | source/slang/slang-ir-specialize-dispatch.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/slang/slang-ir-specialize-dispatch.cpp b/source/slang/slang-ir-specialize-dispatch.cpp index 9d557f196..4d9b15bbd 100644 --- a/source/slang/slang-ir-specialize-dispatch.cpp +++ b/source/slang/slang-ir-specialize-dispatch.cpp @@ -41,7 +41,7 @@ IRFunc* specializeDispatchFunction(SharedGenericsLoweringContext* sharedContext, } SLANG_ASSERT(callInst && lookupInst && returnInst); - IRBuilder builderStorage(sharedContext->sharedBuilderStorage); + IRBuilder builderStorage(sharedContext->module); auto builder = &builderStorage; builder->setInsertBefore(dispatchFunc); @@ -287,7 +287,7 @@ void ensureWitnessTableSequentialIDs(SharedGenericsLoweringContext* sharedContex } // Add a decoration to the inst. - IRBuilder builder(sharedContext->sharedBuilderStorage); + IRBuilder builder(sharedContext->module); builder.setInsertBefore(inst); builder.addSequentialIDDecoration(inst, seqID); } @@ -309,7 +309,7 @@ void fixupDispatchFuncCall(SharedGenericsLoweringContext* sharedContext, IRFunc* { if (call->getCallee() != newDispatchFunc) continue; - IRBuilder builder(sharedContext->sharedBuilderStorage); + IRBuilder builder(sharedContext->module); builder.setInsertBefore(call); List<IRInst*> args; for (UInt i = 0; i < call->getArgCount(); i++) @@ -327,8 +327,6 @@ void fixupDispatchFuncCall(SharedGenericsLoweringContext* sharedContext, IRFunc* void specializeDispatchFunctions(SharedGenericsLoweringContext* sharedContext) { - sharedContext->sharedBuilderStorage.deduplicateAndRebuildGlobalNumberingMap(); - // First we ensure that all witness table objects has a sequential ID assigned. ensureWitnessTableSequentialIDs(sharedContext); |
