LLVM 22.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/VPlanHelpers.h"
Public Types | |
enum class | Kind : uint8_t { First , ScalableLast } |
Kind describes how to interpret Lane. More... |
Public Member Functions | |
VPLane (unsigned Lane) | |
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. | |
Value * | getAsRuntimeExpr (IRBuilderBase &Builder, const ElementCount &VF) const |
Returns an expression describing the lane index that can be used at runtime. | |
Kind | getKind () const |
Returns the Kind of lane offset. | |
bool | isFirstLane () const |
Returns true if this is the first lane of the whole vector. | |
unsigned | mapToCacheIndex (const ElementCount &VF) const |
Maps the lane to a cache index based on VF . |
Static Public Member Functions | |
static VPLane | getFirstLane () |
static VPLane | getLaneFromEnd (const ElementCount &VF, unsigned Offset) |
static VPLane | getLastLaneForVF (const ElementCount &VF) |
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.
Definition at line 125 of file VPlanHelpers.h.
|
strong |
Kind describes how to interpret Lane.
Definition at line 128 of file VPlanHelpers.h.
|
inline |
Definition at line 147 of file VPlanHelpers.h.
Referenced by getFirstLane(), getLaneFromEnd(), and getLastLaneForVF().
Definition at line 148 of file VPlanHelpers.h.
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 85 of file VPlan.cpp.
References First, llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::getRuntimeVF(), llvm_unreachable, and ScalableLast.
|
inlinestatic |
Definition at line 150 of file VPlanHelpers.h.
References First, and VPLane().
Referenced by llvm::VPIRPhi::execute(), llvm::VPTransformState::get(), and scalarizeInstruction().
|
inline |
Returns the Kind of lane offset.
Definition at line 183 of file VPlanHelpers.h.
Referenced by cloneForLane().
|
inline |
Returns a compile-time known value for the lane index and asserts if the lane can only be calculated at runtime.
Definition at line 172 of file VPlanHelpers.h.
References assert(), and First.
Referenced by cloneForLane().
|
inlinestatic |
Definition at line 152 of file VPlanHelpers.h.
References assert(), First, llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), llvm::Offset, ScalableLast, and VPLane().
Referenced by getLastLaneForVF().
|
inlinestatic |
Definition at line 166 of file VPlanHelpers.h.
References getLaneFromEnd(), and VPLane().
Referenced by llvm::VPIRPhi::execute().
|
inline |
Returns true if this is the first lane of the whole vector.
Definition at line 186 of file VPlanHelpers.h.
References First.
|
inline |
Maps the lane to a cache index based on VF
.
Definition at line 189 of file VPlanHelpers.h.
References assert(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), and ScalableLast.