aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKajetan Puchalski <kajetan.puchalski@arm.com>2025-03-26 16:10:35 +0000
committerGitHub <noreply@github.com>2025-03-26 16:10:35 +0000
commit529c5b71c608c18141432e6fd0ae89242d5f309d (patch)
tree4ca3f071d0995f858537a4710bfc0e6614e32ad3 /flang/lib/Frontend/CompilerInvocation.cpp
parent649cbcc3764c554c9c9839f021d073fa9a9f0515 (diff)
downloadllvm-529c5b71c608c18141432e6fd0ae89242d5f309d.zip
llvm-529c5b71c608c18141432e6fd0ae89242d5f309d.tar.gz
llvm-529c5b71c608c18141432e6fd0ae89242d5f309d.tar.bz2
[flang] Add -f[no-]slp-vectorize flags (#132801)
Add -f[no-]slp-vectorize to the flang driver. Add corresponding -fvectorize-slp to the flang frontend. Enable -fslp-vectorize at -O2 and higher in flang to match the current behaviour in clang. --------- Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index f433ec9..652b3d8 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -246,6 +246,9 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
if (args.getLastArg(clang::driver::options::OPT_vectorize_loops))
opts.VectorizeLoop = 1;
+ if (args.getLastArg(clang::driver::options::OPT_vectorize_slp))
+ opts.VectorizeSLP = 1;
+
if (args.hasFlag(clang::driver::options::OPT_floop_versioning,
clang::driver::options::OPT_fno_loop_versioning, false))
opts.LoopVersioning = 1;