[flang-commits] [clang] [flang] [flang] Add -f[no-]vectorize flags (PR #119718)
Tarun Prabhu via flang-commits
flang-commits at lists.llvm.org
Wed Jan 8 05:01:30 PST 2025
================
@@ -6980,3 +6980,37 @@ void driver::applyOverrideOptions(SmallVectorImpl<const char *> &Args,
++S;
}
}
+
+/// Vectorize at all optimization levels greater than 1 except for -Oz.
+/// For -Oz the loop vectorizer is disabled, while the slp vectorizer is
+/// enabled.
+bool driver::shouldEnableVectorizerAtOLevel(const ArgList &Args,
----------------
tarunprabhu wrote:
Since this was originally in the clang toolchain file, it may be better to move it to `clang/lib/Driver/ToolChains/CommonArgs.cpp`. This [has been done](https://github.com/llvm/llvm-project/pull/110132) for other code that is now shared between clang and flang.
https://github.com/llvm/llvm-project/pull/119718
More information about the flang-commits
mailing list