@@ -3144,30 +3144,31 @@ TypeConverter::getConstantInfo(TypeExpansionContext expansion,
3144
3144
// If the constant refers to a derivative function, get the SIL type of the
3145
3145
// original function and use it to compute the derivative SIL type.
3146
3146
//
3147
- // This is necessary because the "lowered AST derivative function type" (BC )
3147
+ // This is necessary because the "lowered AST derivative function type" (bc )
3148
3148
// may differ from the "derivative type of the lowered original function type"
3149
- // (AD ):
3149
+ // (ad ):
3150
3150
//
3151
- // +--------------------+ lowering +--------------------+
3152
- // | AST orig. fn type | -------(A)------> | SIL orig. fn type |
3153
- // +--------------------+ +--------------------+
3154
- // | |
3155
- // (B, Sema) getAutoDiffDerivativeFunctionType (D, here)
3156
- // V V
3157
- // +--------------------+ lowering +--------------------+
3158
- // | AST deriv. fn type | -------(C)------> | SIL deriv. fn type |
3159
- // +--------------------+ +--------------------+
3151
+ // ┌────────────────────┐ lowering ┌────────────────────┐
3152
+ // │ AST orig. fn type │ ───────(a)──────► │ SIL orig. fn type │
3153
+ // └────────────────────┘ └────────────────────┘
3154
+ // │ │
3155
+ // (b, Sema) getAutoDiffDerivativeFunctionType (d, here)
3156
+ // │ │
3157
+ // ▼ ▼
3158
+ // ┌────────────────────┐ lowering ┌────────────────────┐
3159
+ // │ AST deriv. fn type │ ───────(c)──────► │ SIL deriv. fn type │
3160
+ // └────────────────────┘ └────────────────────┘
3160
3161
//
3161
- // (AD ) does not always commute with (BC ):
3162
- // - (BC ) is the result of computing the AST derivative type (Sema), then
3162
+ // (ad ) does not always commute with (bc ):
3163
+ // - (bc ) is the result of computing the AST derivative type (Sema), then
3163
3164
// lowering it via SILGen. This is the default lowering behavior, but may
3164
3165
// break SIL typing invariants because expected lowered derivative types are
3165
3166
// computed from lowered original function types.
3166
- // - (AD ) is the result of lowering the original function type, then computing
3167
+ // - (ad ) is the result of lowering the original function type, then computing
3167
3168
// its derivative type. This is the expected lowered derivative type,
3168
3169
// preserving SIL typing invariants.
3169
3170
//
3170
- // Always use (AD ) to compute lowered derivative function types.
3171
+ // Always use (ad ) to compute lowered derivative function types.
3171
3172
if (auto *derivativeId = constant.derivativeFunctionIdentifier ) {
3172
3173
// Get lowered original function type.
3173
3174
auto origFnConstantInfo = getConstantInfo (
0 commit comments