@@ -3088,30 +3088,31 @@ TypeConverter::getConstantInfo(TypeExpansionContext expansion,
3088
3088
// If the constant refers to a derivative function, get the SIL type of the
3089
3089
// original function and use it to compute the derivative SIL type.
3090
3090
//
3091
- // This is necessary because the "lowered AST derivative function type" (BC )
3091
+ // This is necessary because the "lowered AST derivative function type" (bc )
3092
3092
// may differ from the "derivative type of the lowered original function type"
3093
- // (AD ):
3093
+ // (ad ):
3094
3094
//
3095
- // +--------------------+ lowering +--------------------+
3096
- // | AST orig. fn type | -------(A)------> | SIL orig. fn type |
3097
- // +--------------------+ +--------------------+
3098
- // | |
3099
- // (B, Sema) getAutoDiffDerivativeFunctionType (D, here)
3100
- // V V
3101
- // +--------------------+ lowering +--------------------+
3102
- // | AST deriv. fn type | -------(C)------> | SIL deriv. fn type |
3103
- // +--------------------+ +--------------------+
3095
+ // ┌────────────────────┐ lowering ┌────────────────────┐
3096
+ // │ AST orig. fn type │ ───────(a)──────► │ SIL orig. fn type │
3097
+ // └────────────────────┘ └────────────────────┘
3098
+ // │ │
3099
+ // (b, Sema) getAutoDiffDerivativeFunctionType (d, here)
3100
+ // │ │
3101
+ // ▼ ▼
3102
+ // ┌────────────────────┐ lowering ┌────────────────────┐
3103
+ // │ AST deriv. fn type │ ───────(c)──────► │ SIL deriv. fn type │
3104
+ // └────────────────────┘ └────────────────────┘
3104
3105
//
3105
- // (AD ) does not always commute with (BC ):
3106
- // - (BC ) is the result of computing the AST derivative type (Sema), then
3106
+ // (ad ) does not always commute with (bc ):
3107
+ // - (bc ) is the result of computing the AST derivative type (Sema), then
3107
3108
// lowering it via SILGen. This is the default lowering behavior, but may
3108
3109
// break SIL typing invariants because expected lowered derivative types are
3109
3110
// computed from lowered original function types.
3110
- // - (AD ) is the result of lowering the original function type, then computing
3111
+ // - (ad ) is the result of lowering the original function type, then computing
3111
3112
// its derivative type. This is the expected lowered derivative type,
3112
3113
// preserving SIL typing invariants.
3113
3114
//
3114
- // Always use (AD ) to compute lowered derivative function types.
3115
+ // Always use (ad ) to compute lowered derivative function types.
3115
3116
if (auto *derivativeId = constant.derivativeFunctionIdentifier ) {
3116
3117
// Get lowered original function type.
3117
3118
auto origFnConstantInfo = getConstantInfo (
0 commit comments