mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Use the best resilience expansion when lowering types
This is a large patch; I couldn't split it up further while still keeping things working. There are four things being changed at once here: - Places that call SILType::isAddressOnly()/isLoadable() now call the SILFunction overload and not the SILModule one. - SILFunction's overloads of getTypeLowering() and getLoweredType() now pass the function's resilience expansion down, instead of hardcoding ResilienceExpansion::Minimal. - Various other places with '// FIXME: Expansion' now use a better resilience expansion. - A few tests were updated to reflect SILGen's improved code generation, and some new tests are added to cover more code paths that previously were uncovered and only manifested themselves as standard library build failures while I was working on this change.
This commit is contained in:
@@ -228,45 +228,34 @@ bool SILFunction::isNoReturnFunction() const {
|
||||
|
||||
const TypeLowering &
|
||||
SILFunction::getTypeLowering(AbstractionPattern orig, Type subst) {
|
||||
// FIXME: Expansion
|
||||
return getModule().Types.getTypeLowering(orig, subst,
|
||||
ResilienceExpansion::Minimal);
|
||||
getResilienceExpansion());
|
||||
}
|
||||
|
||||
const TypeLowering &SILFunction::getTypeLowering(Type t) const {
|
||||
// FIXME: Expansion
|
||||
return getModule().Types.getTypeLowering(t, ResilienceExpansion::Minimal);
|
||||
return getModule().Types.getTypeLowering(t, getResilienceExpansion());
|
||||
}
|
||||
|
||||
SILType
|
||||
SILFunction::getLoweredType(AbstractionPattern orig, Type subst) const {
|
||||
// FIXME: Expansion
|
||||
return getModule().Types.getLoweredType(orig, subst,
|
||||
ResilienceExpansion::Minimal);
|
||||
getResilienceExpansion());
|
||||
}
|
||||
|
||||
SILType SILFunction::getLoweredType(Type t) const {
|
||||
// FIXME: Expansion
|
||||
return getModule().Types.getLoweredType(t,
|
||||
ResilienceExpansion::Minimal);
|
||||
return getModule().Types.getLoweredType(t, getResilienceExpansion());
|
||||
}
|
||||
|
||||
SILType SILFunction::getLoweredLoadableType(Type t) const {
|
||||
// FIXME: Expansion
|
||||
return getModule().Types.getLoweredLoadableType(t,
|
||||
ResilienceExpansion::Minimal);
|
||||
return getModule().Types.getLoweredLoadableType(t, getResilienceExpansion());
|
||||
}
|
||||
|
||||
const TypeLowering &SILFunction::getTypeLowering(SILType type) const {
|
||||
// FIXME: Expansion
|
||||
return getModule().Types.getTypeLowering(type,
|
||||
ResilienceExpansion::Minimal);
|
||||
return getModule().Types.getTypeLowering(type, getResilienceExpansion());
|
||||
}
|
||||
|
||||
bool SILFunction::isTypeABIAccessible(SILType type) const {
|
||||
// FIXME: Expansion
|
||||
return getModule().isTypeABIAccessible(type,
|
||||
ResilienceExpansion::Minimal);
|
||||
return getModule().isTypeABIAccessible(type, getResilienceExpansion());
|
||||
}
|
||||
|
||||
SILBasicBlock *SILFunction::createBasicBlock() {
|
||||
|
||||
Reference in New Issue
Block a user