================
@@ -205,36 +205,34 @@ static cl::opt<bool> ForceTargetSupportsMaskedMemoryOps(
cl::desc("Assume the target supports masked memory operations (used for "
"testing)."));
-// Option prefer-predicate-over-epilogue indicates that an epilogue is
undesired,
-// that predication is preferred, and this lists all options. I.e., the
-// vectorizer will try to fold the tail-loop (epilogue) into the vector body
-// and predicate the instructions accordingly. If tail-folding fails, there are
-// different fallback strategies depending on these values:
-namespace PreferPredicateTy {
- enum Option {
- ScalarEpilogue = 0,
- PredicateElseScalarEpilogue,
- PredicateOrDontVectorize
- };
-} // namespace PreferPredicateTy
+// Option prefer-tail-folding indicates that an epilogue is undesired, that
+// tail folding is preferred, and this lists all options. I.e., the vectorizer
+// will try to fold the tail-loop (epilogue) into the vector body and the
+// instructions accordingly. If tail-folding fails, there are different
fallback
+// strategies depending on these values:
+namespace TailFoldingPolicyTy {
+enum Option {
+ PreferEpilogue = 0,
+ FoldTailElseEpilogue,
+ FoldTailOrDontVectorize
+};
+} // namespace TailFoldingPolicyTy
-static cl::opt<PreferPredicateTy::Option> PreferPredicateOverEpilogue(
- "prefer-predicate-over-epilogue",
- cl::init(PreferPredicateTy::ScalarEpilogue),
+static cl::opt<TailFoldingPolicyTy::Option> TailFoldingPolicy(
+ "tail-folding-policy", cl::init(TailFoldingPolicyTy::PreferEpilogue),
cl::Hidden,
- cl::desc("Tail-folding and predication preferences over creating a scalar "
- "epilogue loop."),
- cl::values(clEnumValN(PreferPredicateTy::ScalarEpilogue,
- "scalar-epilogue",
- "Don't tail-predicate loops, create scalar epilogue"),
- clEnumValN(PreferPredicateTy::PredicateElseScalarEpilogue,
- "predicate-else-scalar-epilogue",
- "prefer tail-folding, create scalar epilogue if tail "
- "folding fails."),
- clEnumValN(PreferPredicateTy::PredicateOrDontVectorize,
- "predicate-dont-vectorize",
- "prefers tail-folding, don't attempt vectorization if
"
- "tail-folding fails.")));
+ cl::desc("Tail-folding preferences over creating an epilogue loop."),
+ cl::values(
+ clEnumValN(TailFoldingPolicyTy::PreferEpilogue, "prefer-epilogue",
+ "Don't tail-fold loops, create an epilogue"),
+ clEnumValN(TailFoldingPolicyTy::FoldTailElseEpilogue,
+ "fold-tail-else-epilogue",
+ "prefer tail-folding, create an epilogue if tail "
----------------
david-arm wrote:
I realise the previous comment already said ", create an epilogue ..." but
perhaps this is a good chance to clarify the documentation a bit more? It might
be better to write:
```
"prefer tail-folding, otherwise create an epilogue when appropriate."
```
https://github.com/llvm/llvm-project/pull/191803
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits