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:
Erik Eckstein
2016-09-09 15:33:21 -07:00
parent b67959a6c1
commit bd0d2bfed4
13 changed files with 37 additions and 820 deletions

View File

@@ -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) {