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

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Tue Mar 25 07:05:30 PDT 2025


================
@@ -3177,3 +3177,25 @@ bool tools::shouldEnableVectorizerAtOLevel(const ArgList &Args, bool isSlpVec) {
 
   return false;
 }
+
+/// Enable -fvectorize based on the optimization level selected.
+void tools::handleVectorizeLoopsArgs(const ArgList &Args,
+                                     ArgStringList &CmdArgs) {
+  bool enableVec = shouldEnableVectorizerAtOLevel(Args, false);
----------------
tarunprabhu wrote:

We should try to maintain the conventions in this file. It looks like uppercase is widely used for local variables here.

```suggestion
  bool EnableVec = shouldEnableVectorizerAtOLevel(Args, false);
```

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


More information about the flang-commits mailing list