[PATCH] D101945: [LV] Add -scalable-vectorization=<option> flag.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 03:55:09 PDT 2021


fhahn added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:99
 
+  enum ScalableForceKind {
+    /// Not selected.
----------------
paulwalker-arm wrote:
> fhahn wrote:
> > can this be an enum class or is the code converting from ints to enum values somewhere?
> I prefer that we remain consistent with the other `Kind` enums.
Using an `enum class` enforces stricter guarantees and allows the compiler the emit better warnings, which seem like tangible practical benefits. I'm not sure if consistency with other enums outweighs the practical benefits? It's quite common for parts of the codebase to evolve step-by-step.

Using an `enum` until the other enums are migrated leaves the door open for changes that make switching to an `enum class` harder.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101945/new/

https://reviews.llvm.org/D101945



More information about the llvm-commits mailing list