diff options
Diffstat (limited to 'flang/lib/Frontend')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 4 | ||||
-rw-r--r-- | flang/lib/Frontend/FrontendActions.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index e05ce43..c6d5152 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -163,6 +163,10 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, clang::driver::options::OPT_fno_stack_arrays, false)) { opts.StackArrays = 1; } + if (args.hasFlag(clang::driver::options::OPT_floop_versioning, + clang::driver::options::OPT_fno_loop_versioning, false)) { + opts.LoopVersioning = 1; + } for (auto *a : args.filtered(clang::driver::options::OPT_fpass_plugin_EQ)) opts.LLVMPassPlugins.push_back(a->getValue()); diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp index af6d52d..f3e643e 100644 --- a/flang/lib/Frontend/FrontendActions.cpp +++ b/flang/lib/Frontend/FrontendActions.cpp @@ -665,7 +665,8 @@ void CodeGenAction::generateLLVMIR() { // Create the pass pipeline fir::createMLIRToLLVMPassPipeline(pm, level, opts.StackArrays, - opts.Underscoring, opts.getDebugInfo()); + opts.Underscoring, opts.LoopVersioning, + opts.getDebugInfo()); (void)mlir::applyPassManagerCLOptions(pm); // run the pass manager @@ -704,7 +705,6 @@ void CodeGenAction::generateLLVMIR() { llvmModule->setPIELevel( static_cast<llvm::PIELevel::Level>(opts.PICLevel)); } - } bool CodeGenAction::setUpTargetMachine() { |