@@ -3088,30 +3088,31 @@ TypeConverter::getConstantInfo(TypeExpansionContext expansion,
30883088 // If the constant refers to a derivative function, get the SIL type of the
30893089 // original function and use it to compute the derivative SIL type.
30903090 //
3091- // This is necessary because the "lowered AST derivative function type" (BC )
3091+ // This is necessary because the "lowered AST derivative function type" (bc )
30923092 // may differ from the "derivative type of the lowered original function type"
3093- // (AD ):
3093+ // (ad ):
30943094 //
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+ // └────────────────────┘ └────────────────────┘
31043105 //
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
31073108 // lowering it via SILGen. This is the default lowering behavior, but may
31083109 // break SIL typing invariants because expected lowered derivative types are
31093110 // 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
31113112 // its derivative type. This is the expected lowered derivative type,
31123113 // preserving SIL typing invariants.
31133114 //
3114- // Always use (AD ) to compute lowered derivative function types.
3115+ // Always use (ad ) to compute lowered derivative function types.
31153116 if (auto *derivativeId = constant.derivativeFunctionIdentifier ) {
31163117 // Get lowered original function type.
31173118 auto origFnConstantInfo = getConstantInfo (
0 commit comments