Skip to content

Commit 135e8b1

Browse files
committed
---
yaml --- r: 322431 b: refs/heads/tensorflow-next c: aae6eba h: refs/heads/master i: 322429: bb15419 322427: 42386ce 322423: b581a6e 322415: 432eee1 322399: 7cea465 322367: 49b23e7 322303: 20b4ec2
1 parent 40d56af commit 135e8b1

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,4 +1461,4 @@ refs/heads/master-rebranch: 86e95c23aa0d37f24ec138b7853146c1cead2e40
14611461
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14621462
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14631463
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec
1464-
refs/heads/tensorflow-next: 09c4baf1e4e5b6123597964fd0feb5c30079bf23
1464+
refs/heads/tensorflow-next: aae6ebad4d07e0595f163b3eceef5b39c024af6e

branches/tensorflow-next/lib/SILOptimizer/Transforms/PerformanceInliner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ bool SILPerformanceInliner::isProfitableToInline(
363363
auto Subs = FAI.getSubstitutionMap();
364364

365365
// Bail if it is not a generic call or inlining of generics is forbidden.
366-
if (!EnableSILInliningOfGenerics || Subs.empty())
366+
if (!EnableSILInliningOfGenerics || !Subs.hasAnySubstitutableParams())
367367
continue;
368368

369369
if (!isa<FunctionRefInst>(def) && !isa<ClassMethodInst>(def) &&

branches/tensorflow-next/lib/SILOptimizer/Utils/Generics.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ static bool shouldNotSpecialize(SILFunction *Callee, SILFunction *Caller,
390390
bool ReabstractionInfo::prepareAndCheck(ApplySite Apply, SILFunction *Callee,
391391
SubstitutionMap ParamSubs,
392392
OptRemark::Emitter *ORE) {
393+
assert(ParamSubs.hasAnySubstitutableParams());
394+
393395
if (shouldNotSpecialize(Callee, Apply ? Apply.getFunction() : nullptr))
394396
return false;
395397

0 commit comments

Comments
 (0)