Skip to content

Commit c839e26

Browse files
committed
[NFC] Update an incomplete comment.
1 parent c20a5b7 commit c839e26

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SwiftCompilerSources/Sources/Optimizer/Utilities/LifetimeDependenceUtils.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,12 @@ extension LifetimeDependence.Scope {
481481
}
482482
}
483483

484-
// !!! - handle allocations of trivial values: no destroy. Use the dealloc in that case?
484+
// Note: an initialized range should always have a destroy_addr. For trivial 'var' variables, we have a alloc_box,
485+
// which has a destroy_value. For concrete trivial 'let' variables, we load the trivial value:
486+
// %l = load [trivial] %0
487+
// %m = move_value [var_decl] %2
488+
//
489+
// For generic trivial (BitwiseCopyable) 'let' variables, we emit a destroy_addr for the alloc_stack.
485490
private static func computeInitializedRange(initialAddress: Value, initializingStore: Instruction?,
486491
_ context: Context)
487492
-> InstructionRange {

0 commit comments

Comments
 (0)