Skip to content

Commit a15c3b9

Browse files
authored
Merge pull request #35668 from rxwei/remove-dead-ad-code
2 parents cad5fa8 + 31dd37d commit a15c3b9

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

lib/SILGen/SILGenBuiltin.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,41 +1231,6 @@ static ManagedValue emitBuiltinApplyTranspose(
12311231
arity, throws, SGF, loc, substitutions, args, C);
12321232
}
12331233

1234-
static ManagedValue emitBuiltinDifferentiableFunction(
1235-
SILGenFunction &SGF, SILLocation loc, SubstitutionMap substitutions,
1236-
ArrayRef<ManagedValue> args, SGFContext C) {
1237-
assert(args.size() == 3);
1238-
auto origFn = args.front();
1239-
auto origType = origFn.getType().castTo<SILFunctionType>();
1240-
auto numResults =
1241-
origType->getNumResults() + origType->getNumIndirectMutatingParameters();
1242-
auto diffFn = SGF.B.createDifferentiableFunction(
1243-
loc,
1244-
IndexSubset::getDefault(SGF.getASTContext(), origType->getNumParameters(),
1245-
/*includeAll*/ true),
1246-
IndexSubset::getDefault(SGF.getASTContext(), numResults,
1247-
/*includeAll*/ true),
1248-
origFn.forward(SGF),
1249-
std::make_pair(args[1].forward(SGF), args[2].forward(SGF)));
1250-
return SGF.emitManagedRValueWithCleanup(diffFn);
1251-
}
1252-
1253-
static ManagedValue emitBuiltinLinearFunction(
1254-
SILGenFunction &SGF, SILLocation loc, SubstitutionMap substitutions,
1255-
ArrayRef<ManagedValue> args, SGFContext C) {
1256-
assert(args.size() == 2);
1257-
auto origFn = args.front();
1258-
auto origType = origFn.getType().castTo<SILFunctionType>();
1259-
auto linearFn = SGF.B.createLinearFunction(
1260-
loc,
1261-
IndexSubset::getDefault(
1262-
SGF.getASTContext(),
1263-
origType->getNumParameters(),
1264-
/*includeAll*/ true),
1265-
origFn.forward(SGF), args[1].forward(SGF));
1266-
return SGF.emitManagedRValueWithCleanup(linearFn);
1267-
}
1268-
12691234
/// Emit SIL for the named builtin: globalStringTablePointer. Unlike the default
12701235
/// ownership convention for named builtins, which is to take (non-trivial)
12711236
/// arguments as Owned, this builtin accepts owned as well as guaranteed

0 commit comments

Comments
 (0)