mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
introduce a new helper to SILBuilder that emits a StrongRelease operation,
scanning up the local block to see if it immediately cancels a retain operation. Use this in mandatory inlining to zap more retains and release. Before this patch, the result LogicValue allocation blocked this optimization, preventing the partial_apply from being deleted from the case in rdar://15328833. Swift SVN r10447
This commit is contained in:
@@ -764,6 +764,12 @@ public:
|
||||
/// generate an explicit one if that fails.
|
||||
void emitDestroyAddr(SILLocation Loc, SILValue Operand);
|
||||
|
||||
/// Perform a strong_release instruction at the current location, attempting
|
||||
/// to fold it locally into nearby retain instructions or emitting an explicit
|
||||
/// strong release if necessary. If this inserts a new instruction, it
|
||||
/// returns it, otherwise it returns null.
|
||||
StrongReleaseInst *emitStrongRelease(SILLocation Loc, SILValue Operand);
|
||||
|
||||
/// Convenience function for calling emitRetain on the type lowering
|
||||
/// for the non-address value.
|
||||
SILValue emitCopyValueOperation(SILLocation loc, SILValue v) {
|
||||
|
||||
Reference in New Issue
Block a user