mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[membehavior] Fix base memory behavior/releasing of Load/Store for ownership.
load, store in ossa can have side-effects and stores can release. Specifically: Memory Behavior --------------- * Load: unqualified, trivial, take have a read side-effect, but copy retains so has side-effects. * Store: unqualified, trivial, init may write but assign releases so it may have side-effects. Release Behavior ---------------- * Load: No changes. * Store: May release if store has assign as an ownership qualifier.
This commit is contained in:
@@ -592,7 +592,7 @@ ABSTRACT_VALUE_AND_INST(SingleValueInstruction, ValueBase, SILInstruction)
|
||||
|
||||
// Accessing memory
|
||||
SINGLE_VALUE_INST(LoadInst, load,
|
||||
SingleValueInstruction, MayRead, DoesNotRelease)
|
||||
SingleValueInstruction, MayHaveSideEffects, DoesNotRelease)
|
||||
SINGLE_VALUE_INST(LoadBorrowInst, load_borrow,
|
||||
SingleValueInstruction, MayRead, DoesNotRelease)
|
||||
SINGLE_VALUE_INST(BeginBorrowInst, begin_borrow,
|
||||
@@ -852,7 +852,7 @@ NON_VALUE_INST(BeginUnpairedAccessInst, begin_unpaired_access,
|
||||
NON_VALUE_INST(EndUnpairedAccessInst, end_unpaired_access,
|
||||
SILInstruction, MayHaveSideEffects, DoesNotRelease)
|
||||
NON_VALUE_INST(StoreInst, store,
|
||||
SILInstruction, MayWrite, DoesNotRelease)
|
||||
SILInstruction, MayHaveSideEffects, MayRelease)
|
||||
NON_VALUE_INST(AssignInst, assign,
|
||||
SILInstruction, MayWrite, DoesNotRelease)
|
||||
NON_VALUE_INST(AssignByWrapperInst, assign_by_wrapper,
|
||||
|
||||
Reference in New Issue
Block a user