Skip to content

Commit 4efa03f

Browse files
committed
---
yaml --- r: 344951 b: refs/heads/master c: 6dea8d7 h: refs/heads/master i: 344949: f400563 344947: e0b0821 344943: 470b7ca
1 parent d0b4f7a commit 4efa03f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: af9a0cb825026e5902e718b6849efd26f20273a8
2+
refs/heads/master: 6dea8d75bfe2148b5613587f4e9c3640d2c72bd9
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/SILOptimizer/Utils/SILInliner.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ class SILInliner : public TypeSubstCloner<SILInliner, SILOptFunctionBuilder> {
4444
public:
4545
enum class InlineKind { MandatoryInline, PerformanceInline };
4646

47-
// Returns true if this an begin_apply instruction that we can inline or
48-
// another application site.
49-
static bool canInlineBeginApply(FullApplySite AI);
47+
// Returns true if this an apply site that can't be inlined for some
48+
// structural reason.
49+
static bool canInline(FullApplySite AI);
5050

5151
private:
5252
InlineKind IKind;

trunk/lib/SILOptimizer/Utils/PerformanceInlinerUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ SILFunction *swift::getEligibleFunction(FullApplySite AI,
662662
return nullptr;
663663
}
664664

665-
// We don't currently support inlining co-routines with several yields.
666-
if (!SILInliner::canInlineBeginApply(AI))
665+
// Not all apply sites can be inlined, even if they're direct.
666+
if (!SILInliner::canInline(AI))
667667
return nullptr;
668668

669669
auto ModuleName = Callee->getModule().getSwiftModule()->getName().str();

trunk/lib/SILOptimizer/Utils/SILInliner.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ static bool canInlineBeginApply(BeginApplyInst *BA) {
5959
return true;
6060
}
6161

62-
bool SILInliner::canInlineBeginApply(FullApplySite AI) {
62+
bool SILInliner::canInline(FullApplySite AI) {
6363
if (auto BA = dyn_cast<BeginApplyInst>(AI)) {
64-
return ::canInlineBeginApply(BA);
64+
return canInlineBeginApply(BA);
6565
}
6666
return true;
6767
}
6868

6969
bool SILInliner::canInlineFunction(FullApplySite AI) {
70-
if (!canInlineBeginApply(AI))
70+
if (!canInline(AI))
7171
return false;
7272
return AI.getFunction() != &Original;
7373
}

0 commit comments

Comments
 (0)