mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add new SIL instruction for calling dynamically_replaceable funtions
%0 = dynamic_function_ref @dynamically_replaceable_function apply %0() Calls a [dynamically_replaceable] function. %0 = prev_dynamic_function_ref @dynamic_replacement_function apply %0 Calls the previous implementation that dynamic_replacement_function replaced.
This commit is contained in:
@@ -173,6 +173,16 @@ void SILLinkerVisitor::visitFunctionRefInst(FunctionRefInst *FRI) {
|
||||
maybeAddFunctionToWorklist(FRI->getReferencedFunction());
|
||||
}
|
||||
|
||||
void SILLinkerVisitor::visitDynamicFunctionRefInst(
|
||||
DynamicFunctionRefInst *FRI) {
|
||||
maybeAddFunctionToWorklist(FRI->getReferencedFunction());
|
||||
}
|
||||
|
||||
void SILLinkerVisitor::visitPreviousDynamicFunctionRefInst(
|
||||
PreviousDynamicFunctionRefInst *FRI) {
|
||||
maybeAddFunctionToWorklist(FRI->getReferencedFunction());
|
||||
}
|
||||
|
||||
// Eagerly visiting all used conformances leads to a large blowup
|
||||
// in the amount of SIL we read in. For optimization purposes we can defer
|
||||
// reading in most conformances until we need them for devirtualization.
|
||||
|
||||
Reference in New Issue
Block a user