@@ -1231,41 +1231,6 @@ static ManagedValue emitBuiltinApplyTranspose(
1231
1231
arity, throws, SGF, loc, substitutions, args, C);
1232
1232
}
1233
1233
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
-
1269
1234
// / Emit SIL for the named builtin: globalStringTablePointer. Unlike the default
1270
1235
// / ownership convention for named builtins, which is to take (non-trivial)
1271
1236
// / arguments as Owned, this builtin accepts owned as well as guaranteed
0 commit comments