File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ static llvm::codegen::RegisterCodeGenFlags CGF;
8080static llvm::cl::list<const llvm::PassInfo *, bool , llvm::PassNameParser>
8181 PassList (llvm::cl::desc(" Optimizations available:" ));
8282
83+ static llvm::cl::opt<bool >
84+ UseLegacyPassManager (" legacy-pass-manager" ,
85+ llvm::cl::desc (" Use the legacy llvm pass manager" ),
86+ llvm::cl::init(true ));
87+
8388static llvm::cl::opt<bool >
8489 Optimized (" O" , llvm::cl::desc(" Optimization level O. Similar to swift -O" ));
8590
@@ -309,6 +314,7 @@ int main(int argc, char **argv) {
309314 if (Optimized) {
310315 IRGenOptions Opts;
311316 Opts.OptMode = OptimizationMode::ForSpeed;
317+ Opts.LegacyPassManager = UseLegacyPassManager;
312318
313319 // Then perform the optimizations.
314320 performLLVMOptimizations (Opts, M.get (), TM.get ());
You can’t perform that action at this time.
0 commit comments