@@ -80,24 +80,16 @@ static bool shouldTransformFunctionType(GenericEnvironment *env,
80
80
CanSILFunctionType fnType,
81
81
irgen::IRGenModule &IGM);
82
82
83
+ static SILParameterInfo getNewParameter (GenericEnvironment *env,
84
+ SILParameterInfo param,
85
+ irgen::IRGenModule &IGM);
86
+
83
87
static bool shouldTransformParameter (GenericEnvironment *env,
84
88
SILParameterInfo param,
85
89
irgen::IRGenModule &IGM) {
86
- SILType storageType = param.getSILStorageType ();
87
-
88
- // FIXME: only function types and not recursively-transformable types?
89
- if (auto fnType = storageType.getAs <SILFunctionType>())
90
- return shouldTransformFunctionType (env, fnType, IGM);
91
90
92
- switch (param.getConvention ()) {
93
- case ParameterConvention::Indirect_In_Guaranteed:
94
- case ParameterConvention::Indirect_Inout:
95
- case ParameterConvention::Indirect_InoutAliasable:
96
- case ParameterConvention::Indirect_In:
97
- return false ;
98
- default :
99
- return isLargeLoadableType (env, storageType, IGM);
100
- }
91
+ auto newParam = getNewParameter (env, param, IGM);
92
+ return (param != newParam);
101
93
}
102
94
103
95
static bool shouldTransformFunctionType (GenericEnvironment *env,
@@ -2604,6 +2596,10 @@ void LoadableByAddress::run() {
2604
2596
if (isa<ProjectBlockStorageInst>(dest)) {
2605
2597
storeToBlockStorageInstrs.insert (SI);
2606
2598
}
2599
+ } else if (auto *PAI = dyn_cast<PartialApplyInst>(&I)) {
2600
+ if (modApplies.count (PAI) == 0 ) {
2601
+ modApplies.insert (PAI);
2602
+ }
2607
2603
}
2608
2604
}
2609
2605
}
0 commit comments