From 5dd962ceddf9cbc1ae0f0b5fe09a2bb95ffcc715 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 2 Sep 2020 18:47:35 -0400 Subject: [PATCH] AutoDiff: Remove some unnecessary calls to getInterfaceType() --- lib/SILOptimizer/Differentiation/LinearMapInfo.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/SILOptimizer/Differentiation/LinearMapInfo.cpp b/lib/SILOptimizer/Differentiation/LinearMapInfo.cpp index 4582c20521d6d..e27b7f38a1a3b 100644 --- a/lib/SILOptimizer/Differentiation/LinearMapInfo.cpp +++ b/lib/SILOptimizer/Differentiation/LinearMapInfo.cpp @@ -141,8 +141,6 @@ LinearMapInfo::createBranchingTraceDecl(SILBasicBlock *originalBB, if (genericSig) branchingTraceDecl->setGenericSignature(genericSig); computeAccessLevel(branchingTraceDecl, original->getEffectiveSymbolLinkage()); - branchingTraceDecl->getInterfaceType(); - assert(branchingTraceDecl->hasInterfaceType()); file.addTopLevelDecl(branchingTraceDecl); // Add basic block enum cases. for (auto *predBB : originalBB->getPredecessorBlocks()) { @@ -165,7 +163,6 @@ LinearMapInfo::createBranchingTraceDecl(SILBasicBlock *originalBB, /*IdentifierLoc*/ loc, DeclName(astCtx.getIdentifier(bbId)), paramList, loc, /*RawValueExpr*/ nullptr, branchingTraceDecl); enumEltDecl->setImplicit(); - enumEltDecl->getInterfaceType(); auto *enumCaseDecl = EnumCaseDecl::create( /*CaseLoc*/ loc, {enumEltDecl}, branchingTraceDecl); enumCaseDecl->setImplicit(); @@ -207,8 +204,6 @@ LinearMapInfo::createLinearMapStruct(SILBasicBlock *originalBB, if (genericSig) linearMapStruct->setGenericSignature(genericSig); computeAccessLevel(linearMapStruct, original->getEffectiveSymbolLinkage()); - linearMapStruct->getInterfaceType(); - assert(linearMapStruct->hasInterfaceType()); file.addTopLevelDecl(linearMapStruct); return linearMapStruct; }