mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #17026 from aschwaighofer/wip_begin_apply_inlining
SILInliner: Initial support for begin_apply
This commit is contained in:
@@ -656,12 +656,7 @@ static bool isCallerAndCalleeLayoutConstraintsCompatible(FullApplySite AI) {
|
||||
// Returns the callee of an apply_inst if it is basically inlinable.
|
||||
SILFunction *swift::getEligibleFunction(FullApplySite AI,
|
||||
InlineSelection WhatToInline) {
|
||||
// For now, we cannot inline begin_apply at all.
|
||||
if (isa<BeginApplyInst>(AI))
|
||||
return nullptr;
|
||||
|
||||
SILFunction *Callee = AI.getReferencedFunction();
|
||||
SILFunction *EligibleCallee = nullptr;
|
||||
|
||||
if (!Callee) {
|
||||
return nullptr;
|
||||
@@ -776,8 +771,7 @@ SILFunction *swift::getEligibleFunction(FullApplySite AI,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
EligibleCallee = Callee;
|
||||
return EligibleCallee;
|
||||
return Callee;
|
||||
}
|
||||
|
||||
/// Returns true if the instruction \I has any interesting side effects which
|
||||
|
||||
Reference in New Issue
Block a user