Skip to content

Commit af8f483

Browse files
committed
Add clarifying comments.
1 parent ea81ed4 commit af8f483

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/SILGen/SILGenPoly.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3695,6 +3695,8 @@ SILGenModule::getOrCreateAutoDiffDerivativeFunctionThunk(
36953695
SILGenFunctionBuilder fb(*this);
36963696
auto linkage = autodiff::getAutoDiffDerivativeFunctionLinkage(
36973697
original->getLinkage(), /*isDerivativeFnExported*/ true);
3698+
// This thunk is publicly exposed and cannot be transparent.
3699+
// TODO(TF-925): Mark the thunks as "always inline" for optimization.
36983700
auto *thunk = fb.getOrCreateFunction(
36993701
loc, name, linkage, origDerivativeFnType, IsBare, IsNotTransparent,
37003702
derivativeFn->isSerialized(), derivativeFn->isDynamicallyReplaceable(),

lib/SILGen/SILGenThunk.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ SILGenModule::getOrCreateAutoDiffThunk(SILDeclRef derivativeFnDeclRef,
8686
auto linkage = autodiff::getAutoDiffDerivativeFunctionLinkage(
8787
originalLinkage, /*isDerivativeFnExported*/ true);
8888
auto name = derivativeFnDeclRef.mangle();
89+
// This thunk is publicly exposed and cannot be transparent.
90+
// TODO(TF-925): Mark the thunks as "always inline" for optimization.
8991
auto *thunk = builder.getOrCreateFunction(
9092
derivativeFnDecl, name, linkage, derivativeFnTy, IsBare, IsNotTransparent,
9193
derivativeFnDeclRef.isSerialized(), IsNotDynamic, ProfileCounter(),

0 commit comments

Comments
 (0)