@@ -79,24 +79,16 @@ static bool shouldTransformFunctionType(GenericEnvironment *env,
79
79
CanSILFunctionType fnType,
80
80
irgen::IRGenModule &IGM);
81
81
82
+ static SILParameterInfo getNewParameter (GenericEnvironment *env,
83
+ SILParameterInfo param,
84
+ irgen::IRGenModule &IGM);
85
+
82
86
static bool shouldTransformParameter (GenericEnvironment *env,
83
87
SILParameterInfo param,
84
88
irgen::IRGenModule &IGM) {
85
- SILType storageType = param.getSILStorageType ();
86
-
87
- // FIXME: only function types and not recursively-transformable types?
88
- if (auto fnType = storageType.getAs <SILFunctionType>())
89
- return shouldTransformFunctionType (env, fnType, IGM);
90
89
91
- switch (param.getConvention ()) {
92
- case ParameterConvention::Indirect_In_Guaranteed:
93
- case ParameterConvention::Indirect_Inout:
94
- case ParameterConvention::Indirect_InoutAliasable:
95
- case ParameterConvention::Indirect_In:
96
- return false ;
97
- default :
98
- return isLargeLoadableType (env, storageType, IGM);
99
- }
90
+ auto newParam = getNewParameter (env, param, IGM);
91
+ return (param != newParam);
100
92
}
101
93
102
94
static bool shouldTransformFunctionType (GenericEnvironment *env,
@@ -2558,6 +2550,10 @@ void LoadableByAddress::run() {
2558
2550
if (isa<ProjectBlockStorageInst>(dest)) {
2559
2551
storeToBlockStorageInstrs.insert (SI);
2560
2552
}
2553
+ } else if (auto *PAI = dyn_cast<PartialApplyInst>(&I)) {
2554
+ if (modApplies.count (PAI) == 0 ) {
2555
+ modApplies.insert (PAI);
2556
+ }
2561
2557
}
2562
2558
}
2563
2559
}
0 commit comments