Skip to content

Commit cbd70e0

Browse files
committed
[SILOptimizer] Handle FunctionExtractIsolationInst in the mandatory passes.
1 parent 479ee38 commit cbd70e0

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

SwiftCompilerSources/Sources/SIL/ForwardingInstruction.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,12 @@ extension DestructureStructInst : ForwardingInstruction {
323323
public var canForwardOwnedValues: Bool { true }
324324
}
325325

326+
extension FunctionExtractIsolationInst : ForwardingInstruction {
327+
public var preservesRepresentation: Bool { true }
328+
public var canForwardGuaranteedValues: Bool { true }
329+
public var canForwardOwnedValues: Bool { false }
330+
}
331+
326332
extension InitExistentialRefInst : ForwardingInstruction {
327333
public var preservesRepresentation: Bool { true }
328334
public var canForwardGuaranteedValues: Bool { true }

lib/SILOptimizer/Mandatory/OwnershipModelEliminator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ struct OwnershipModelEliminatorVisitor
219219
HANDLE_FORWARDING_INST(LinearFunctionExtract)
220220
HANDLE_FORWARDING_INST(DifferentiableFunctionExtract)
221221
HANDLE_FORWARDING_INST(MarkUninitialized)
222+
HANDLE_FORWARDING_INST(FunctionExtractIsolation)
222223
#undef HANDLE_FORWARDING_INST
223224
};
224225

lib/SILOptimizer/SemanticARC/SemanticARCOptVisitor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ struct LLVM_LIBRARY_VISIBILITY SemanticARCOptVisitor
196196
FORWARDING_INST(LinearFunction)
197197
FORWARDING_INST(DifferentiableFunctionExtract)
198198
FORWARDING_INST(LinearFunctionExtract)
199+
FORWARDING_INST(FunctionExtractIsolation)
199200
#undef FORWARDING_INST
200201

201202
bool processWorklist();

0 commit comments

Comments
 (0)