@@ -3144,30 +3144,31 @@ TypeConverter::getConstantInfo(TypeExpansionContext expansion,
31443144 // If the constant refers to a derivative function, get the SIL type of the
31453145 // original function and use it to compute the derivative SIL type.
31463146 //
3147- // This is necessary because the "lowered AST derivative function type" (BC )
3147+ // This is necessary because the "lowered AST derivative function type" (bc )
31483148 // may differ from the "derivative type of the lowered original function type"
3149- // (AD ):
3149+ // (ad ):
31503150 //
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+ // └────────────────────┘ └────────────────────┘
31603161 //
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
31633164 // lowering it via SILGen. This is the default lowering behavior, but may
31643165 // break SIL typing invariants because expected lowered derivative types are
31653166 // 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
31673168 // its derivative type. This is the expected lowered derivative type,
31683169 // preserving SIL typing invariants.
31693170 //
3170- // Always use (AD ) to compute lowered derivative function types.
3171+ // Always use (ad ) to compute lowered derivative function types.
31713172 if (auto *derivativeId = constant.derivativeFunctionIdentifier ) {
31723173 // Get lowered original function type.
31733174 auto origFnConstantInfo = getConstantInfo (
0 commit comments