mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Remove the LLVM stack promotion pass and related SIL optimization logic.
It's not needed anymore because array buffers are now allocated with alloc_ref instead of a swift_bufferAllocate runtime call.
This commit is contained in:
@@ -88,12 +88,6 @@ static void addSwiftContractPass(const PassManagerBuilder &Builder,
|
||||
PM.add(createSwiftARCContractPass());
|
||||
}
|
||||
|
||||
static void addSwiftStackPromotionPass(const PassManagerBuilder &Builder,
|
||||
PassManagerBase &PM) {
|
||||
if (Builder.OptLevel > 0)
|
||||
PM.add(createSwiftStackPromotionPass());
|
||||
}
|
||||
|
||||
static void addSwiftMergeFunctionsPass(const PassManagerBuilder &Builder,
|
||||
PassManagerBase &PM) {
|
||||
if (Builder.OptLevel > 0)
|
||||
@@ -162,9 +156,6 @@ void swift::performLLVMOptimizations(IRGenOptions &Opts, llvm::Module *Module,
|
||||
llvm::createAlwaysInlinerPass(/*insertlifetime*/false);
|
||||
}
|
||||
|
||||
PMBuilder.addExtension(PassManagerBuilder::EP_ModuleOptimizerEarly,
|
||||
addSwiftStackPromotionPass);
|
||||
|
||||
// If the optimizer is enabled, we run the ARCOpt pass in the scalar optimizer
|
||||
// and the Contract pass as late as possible.
|
||||
if (!Opts.DisableLLVMARCOpts) {
|
||||
|
||||
Reference in New Issue
Block a user