LLVM
24.0.0git
lib
Transforms
Vectorize
VectorizeOptions.h
Go to the documentation of this file.
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/IR/Function.h
"
13
#include "
llvm/IR/LLVMContext.h
"
14
#include "
llvm/Transforms/Vectorize/LoopVectorizationLegality.h
"
15
#include <optional>
16
17
namespace
llvm
{
18
enum class
LoopIdiomVectorizeStyle
;
19
enum class
TailFoldingStyle
;
20
21
/// Option tail-folding-policy controls the tail-folding strategy and lists all
22
/// available options. The vectorizer will attempt to fold the tail-loop into
23
/// the vector loop (main/epilogue loops) and predicate the instructions
24
/// accordingly. If tail-folding fails, there are different fallback strategies
25
/// depending on these values:
26
enum class
TailFoldingPolicyTy
{
None
= 0,
PreferFoldTail
,
MustFoldTail
};
27
28
// The -sbvec-stop-at and -sbvec-stop-bndl value that disables the limit.
29
constexpr
unsigned
long
SBVecStopDisabled
= ~0UL;
30
31
#ifdef EXPENSIVE_CHECKS
32
constexpr
bool
VPlanVerifyEachDefault
=
true
;
33
#else
34
constexpr
bool
VPlanVerifyEachDefault
=
false
;
35
#endif
36
}
// namespace llvm
37
38
#define OPTIONS_STRUCT_DECL
39
#include "VectorizeOptions.inc"
40
41
namespace
llvm
{
42
43
class
Loop
;
44
namespace
sandboxir {
45
class
Context;
46
}
// namespace sandboxir
47
48
inline
const
VectorizeOptions &
getVectorizeOptions
(
const
LLVMContext
&
C
) {
49
return
C
.getLibraryOptions().get<VectorizeOptions>();
50
}
51
52
inline
const
VectorizeOptions &
getVectorizeOptions
(
const
Function
&
F
) {
53
return
getVectorizeOptions
(
F
.getContext());
54
}
55
56
const
VectorizeOptions &
getVectorizeOptions
(
const
Loop
&L);
57
const
VectorizeOptions &
getVectorizeOptions
(
const
sandboxir::Context &
C
);
58
59
}
// namespace llvm
60
61
#endif
// LLVM_LIB_TRANSFORMS_VECTORIZE_VECTORIZEOPTIONS_H
C
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
Function.h
LLVMContext.h
LoopVectorizationLegality.h
This file defines the LoopVectorizationLegality class.
F
#define F(x, y, z)
Definition
MD5.cpp:54
llvm::Function
Definition
Function.h:65
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition
LLVMContext.h:76
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
DefaultTargetInfo.h:21
llvm::LoopIdiomVectorizeStyle
LoopIdiomVectorizeStyle
Definition
LoopIdiomVectorize.h:16
llvm::TailFoldingPolicyTy
TailFoldingPolicyTy
Option tail-folding-policy controls the tail-folding strategy and lists all available options.
Definition
VectorizeOptions.h:26
llvm::TailFoldingPolicyTy::PreferFoldTail
@ PreferFoldTail
Definition
VectorizeOptions.h:26
llvm::TailFoldingPolicyTy::MustFoldTail
@ MustFoldTail
Definition
VectorizeOptions.h:26
llvm::IRUnitKind::Loop
@ Loop
Definition
IRUnitRef.h:34
llvm::SBVecStopDisabled
constexpr unsigned long SBVecStopDisabled
Definition
VectorizeOptions.h:29
llvm::None
@ None
Definition
CodeGenData.h:111
llvm::VPlanVerifyEachDefault
constexpr bool VPlanVerifyEachDefault
Definition
VectorizeOptions.h:34
llvm::getVectorizeOptions
const VectorizeOptions & getVectorizeOptions(const LLVMContext &C)
Definition
VectorizeOptions.h:48
llvm::TailFoldingStyle
TailFoldingStyle
Definition
TargetTransformInfo.h:256
Generated on
for LLVM by
1.14.0