[flang-commits] [clang] [flang] [flang] Add -f[no-]vectorize flags (PR #119718)

David Truby via flang-commits flang-commits at lists.llvm.org
Tue Feb 18 05:37:19 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,
----------------
DavidTruby wrote:

I should clarify that I decided to move them to `CommonArgs.cpp` as requested because these checks really are only relevant to the _compiler_ driver, and so shouldn't really be in the shared Frontend driver parts of `llvm`.

https://github.com/llvm/llvm-project/pull/119718


More information about the flang-commits mailing list