/// Non-mandatory passes that should run as preparation for IRGen. static void addIRGenPreparePipeline(SILPassPipelinePlan &P) { P.startPipeline("IRGen Preparation"); // Insert SIL passes to run during IRGen. // Hoist generic alloc_stack instructions to the entry block to enable better // llvm-ir generation for dynamic alloca instructions. P.addAllocStackHoisting(); }
SILPassPipelinePlan SILPassPipelinePlan::getIRGenPreparePassPipeline(const SILOptions &Options) { SILPassPipelinePlan P; P.startPipeline("IRGen Preparation"); // Insert SIL passes to run during IRGen. // Hoist generic alloc_stack instructions to the entry block to enable better // llvm-ir generation for dynamic alloca instructions. P.addAllocStackHoisting(); if (Options.EnableLargeLoadableTypes) { P.addLoadableByAddress(); } return P; }