LLVM
15.0.0git
|
In what follows, the term "input IR" refers to code that is fed into the vectorizer whereas the term "output IR" refers to code that is generated by the vectorizer. More...
#include "Transforms/Vectorize/VPlan.h"
Public Types | |
enum | Kind : uint8_t { Kind::First, Kind::ScalableLast } |
Kind describes how to interpret Lane. More... | |
Public Member Functions | |
VPLane (unsigned Lane, Kind LaneKind) | |
unsigned | getKnownLane () const |
Returns a compile-time known value for the lane index and asserts if the lane can only be calculated at runtime. More... | |
Value * | getAsRuntimeExpr (IRBuilderBase &Builder, const ElementCount &VF) const |
Returns an expression describing the lane index that can be used at runtime. More... | |
Kind | getKind () const |
Returns the Kind of lane offset. More... | |
bool | isFirstLane () const |
Returns true if this is the first lane of the whole vector. More... | |
unsigned | mapToCacheIndex (const ElementCount &VF) const |
Maps the lane to a cache index based on VF . More... | |
Static Public Member Functions | |
static VPLane | getFirstLane () |
static VPLane | getLastLaneForVF (const ElementCount &VF) |
static unsigned | getNumCachedLanes (const ElementCount &VF) |
Returns the maxmimum number of lanes that we are able to consider caching for VF . More... | |
In what follows, the term "input IR" refers to code that is fed into the vectorizer whereas the term "output IR" refers to code that is generated by the vectorizer.
VPLane provides a way to access lanes in both fixed width and scalable vectors, where for the latter the lane index sometimes needs calculating as a runtime expression.
|
strong |
Kind describes how to interpret Lane.
|
inline |
Definition at line 130 of file VPlan.h.
Referenced by getFirstLane(), and getLastLaneForVF().
Value * VPLane::getAsRuntimeExpr | ( | IRBuilderBase & | Builder, |
const ElementCount & | VF | ||
) | const |
Returns an expression describing the lane index that can be used at runtime.
Definition at line 62 of file VPlan.cpp.
References Builder, First, llvm::LinearPolySize< LeafTy >::getKnownMinValue(), llvm::getRuntimeVF(), llvm_unreachable, and ScalableLast.
Referenced by llvm::InnerLoopVectorizer::packScalarIntoVectorValue().
|
inlinestatic |
Definition at line 132 of file VPlan.h.
References First, and VPLane().
Referenced by llvm::VPLiveOut::fixPhi(), and llvm::InnerLoopVectorizer::scalarizeInstruction().
|
inline |
|
inline |
|
inlinestatic |
Definition at line 134 of file VPlan.h.
References First, llvm::LinearPolySize< LeafTy >::getKnownMinValue(), llvm::LinearPolySize< LeafTy >::isScalable(), ScalableLast, and VPLane().
Referenced by llvm::VPLiveOut::fixPhi().
|
inlinestatic |
Returns the maxmimum number of lanes that we are able to consider caching for VF
.
Definition at line 177 of file VPlan.h.
References llvm::LinearPolySize< LeafTy >::getKnownMinValue(), and llvm::LinearPolySize< LeafTy >::isScalable().
|
inline |
Returns true if this is the first lane of the whole vector.
Definition at line 161 of file VPlan.h.
References First.
Referenced by llvm::VPIteration::isFirstIteration().
|
inline |
Maps the lane to a cache index based on VF
.
Definition at line 164 of file VPlan.h.
References assert(), llvm::LinearPolySize< LeafTy >::getKnownMinValue(), llvm::LinearPolySize< LeafTy >::isScalable(), and ScalableLast.