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-lower-com-methods.cpp | |
| parent | 4c4826d47eeef4675daae4ae53ff76f4d5ebd84a (diff) | |
Remove `SharedIRBuilder`. (#2657)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-lower-com-methods.cpp')
| -rw-r--r-- | source/slang/slang-ir-lower-com-methods.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source/slang/slang-ir-lower-com-methods.cpp b/source/slang/slang-ir-lower-com-methods.cpp index 495e20151..4ff9c1848 100644 --- a/source/slang/slang-ir-lower-com-methods.cpp +++ b/source/slang/slang-ir-lower-com-methods.cpp @@ -25,7 +25,7 @@ struct ComMethodLoweringContext : public InstPassBase void processComCall(IRCall* comCall) { - IRBuilder builder(&sharedBuilderStorage); + IRBuilder builder(module); builder.setInsertBefore(comCall); auto callee = as<IRLookupWitnessMethod>(comCall->getCallee()); SLANG_ASSERT(callee); @@ -101,7 +101,7 @@ struct ComMethodLoweringContext : public InstPassBase { if (!interfaceType->findDecoration<IRComInterfaceDecoration>()) return; - IRBuilder builder(&sharedBuilderStorage); + IRBuilder builder(module); for (UInt i = 0; i < interfaceType->getOperandCount(); i++) { auto entry = as<IRInterfaceRequirementEntry>(interfaceType->getOperand(i)); @@ -123,7 +123,7 @@ struct ComMethodLoweringContext : public InstPassBase return; auto interfaceReqDict = buildInterfaceRequirementDict(interfaceType); - IRBuilder builder(&sharedBuilderStorage); + IRBuilder builder(module); NativeCallMarshallingContext marshalContext; marshalContext.diagnosticSink = diagnosticSink; for (auto entry : witnessTable->getEntries()) @@ -148,18 +148,13 @@ struct ComMethodLoweringContext : public InstPassBase void processModule() { - sharedBuilderStorage.init(module); - - // Deduplicate equivalent types. - sharedBuilderStorage.deduplicateAndRebuildGlobalNumberingMap(); - // Translate all Calls to interface methods. processInstsOfType<IRCall>(kIROp_Call, [this](IRCall* inst) { processCall(inst); }); // Update functypes of com callees. for (auto callee : comCallees) { - IRBuilder builder(&sharedBuilderStorage); + IRBuilder builder(module); builder.setInsertBefore(callee); auto nativeType = marshal.getNativeFuncType(builder, as<IRFuncType>(callee->getDataType())); callee->setFullType(nativeType); |
