Skip to content

Commit 98ef683

Browse files
author
Joe Shajrawi
authored
Merge pull request #15517 from shajrawi/expand_all
[SILOptimizer] shouldExpand can't expand address only types
2 parents cc02728 + e0d94d6 commit 98ef683

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILOptimizer/Utils/Local.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,12 +1330,12 @@ bool swift::simplifyUsers(SingleValueInstruction *I) {
13301330
/// True if a type can be expanded
13311331
/// without a significant increase to code size.
13321332
bool swift::shouldExpand(SILModule &Module, SILType Ty) {
1333-
if (EnableExpandAll) {
1334-
return true;
1335-
}
13361333
if (Ty.isAddressOnly(Module)) {
13371334
return false;
13381335
}
1336+
if (EnableExpandAll) {
1337+
return true;
1338+
}
13391339
unsigned numFields = Module.Types.countNumberOfFields(Ty);
13401340
if (numFields > 6) {
13411341
return false;

0 commit comments

Comments
 (0)