1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIB_TRANSFORMS_VECTORIZE_VECTORIZEOPTIONS_H
10#define LLVM_LIB_TRANSFORMS_VECTORIZE_VECTORIZEOPTIONS_H
11
12#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
13#include <optional>
14
15namespace llvm {
16enum class LoopIdiomVectorizeStyle;
17enum class TailFoldingStyle;
18
19/// Option tail-folding-policy controls the tail-folding strategy and lists all
20/// available options. The vectorizer will attempt to fold the tail-loop into
21/// the vector loop (main/epilogue loops) and predicate the instructions
22/// accordingly. If tail-folding fails, there are different fallback strategies
23/// depending on these values:
24enum class TailFoldingPolicyTy { None = 0, PreferFoldTail, MustFoldTail };
25
26// The -sbvec-stop-at and -sbvec-stop-bndl value that disables the limit.
27constexpr unsigned long SBVecStopDisabled = ~0UL;
28
29#ifdef EXPENSIVE_CHECKS
30constexpr bool VPlanVerifyEachDefault = true;
31#else
32constexpr bool VPlanVerifyEachDefault = false;
33#endif
34} // namespace llvm
35
36#define OPTIONS_STRUCT_DECL
37#include "VectorizeOptions.inc"
38
39#endif // LLVM_LIB_TRANSFORMS_VECTORIZE_VECTORIZEOPTIONS_H
40