[SILOptimizer] Add prespecialization for arbitray reference types (#58846)

* [SILOptimizer] Add prespecialization for arbitray reference types

* Fix benchmark Package.swift

* Move SimpleArray to utils

* Fix multiple indirect result case

* Remove leftover code from previous attempt

* Fix test after rebase

* Move code to compute type replacements to SpecializedFunction

* Fix ownership when OSSA is enabled

* Fixes after rebase

* Changes after rebasing

* Add feature flag for layout pre-specialization

* Fix pre_specialize-macos.swift

* Add compiler flag to benchmark build

* Fix benchmark SwiftPM flags
This commit is contained in:
Dario Rexin
2022-09-22 16:29:01 -07:00
committed by GitHub
parent 6b586b6afd
commit 210c68d8aa
45 changed files with 1199 additions and 180 deletions

View File

@@ -65,8 +65,10 @@ static void transferSpecializeAttributeTargets(SILModule &M,
}
auto availability = AvailabilityInference::annotatedAvailableRangeForAttr(
SA, M.getSwiftModule()->getASTContext());
targetSILFunction->addSpecializeAttr(SILSpecializeAttr::create(
M, SA->getSpecializedSignature(), SA->isExported(), kind, nullptr,
M, SA->getSpecializedSignature(), SA->getTypeErasedParams(),
SA->isExported(), kind, nullptr,
spiGroupIdent, vd->getModuleContext(), availability));
}
}