mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add the notion of releasing instructions to SILNodes.def.
This will be used in call graph construction so that we can model calls to deinits that are potentially called as a result of executing instructions that can end up releasing memory.
This commit is contained in:
@@ -97,6 +97,13 @@ public:
|
||||
MayHaveSideEffects,
|
||||
};
|
||||
|
||||
/// Enumeration representing whether the execution of an instruction can
|
||||
/// result in memory being released.
|
||||
enum class ReleasingBehavior {
|
||||
DoesNotRelease,
|
||||
MayRelease,
|
||||
};
|
||||
|
||||
const SILBasicBlock *getParent() const { return ParentBB; }
|
||||
SILBasicBlock *getParent() { return ParentBB; }
|
||||
|
||||
@@ -151,6 +158,7 @@ public:
|
||||
}
|
||||
|
||||
MemoryBehavior getMemoryBehavior() const;
|
||||
ReleasingBehavior getReleasingBehavior() const;
|
||||
|
||||
/// Can this instruction abort the program in some manner?
|
||||
bool mayTrap() const;
|
||||
|
||||
Reference in New Issue
Block a user