|
LLVM 23.0.0git
|
VPTransformState holds information passed down when "executing" a VPlan, needed for generating the output IR. More...
#include "Transforms/Vectorize/VPlanHelpers.h"
Classes | |
| struct | CFGState |
| Hold state information used when constructing the CFG of the output IR, traversing the VPBasicBlocks and generating corresponding IR BasicBlocks. More... | |
| struct | DataState |
Public Member Functions | |
| VPTransformState (const TargetTransformInfo *TTI, ElementCount VF, LoopInfo *LI, DominatorTree *DT, AssumptionCache *AC, IRBuilderBase &Builder, VPlan *Plan, Loop *CurrentParentLoop, Type *CanonicalIVTy) | |
| Value * | get (const VPValue *Def, bool IsScalar=false) |
Get the generated vector Value for a given VPValue Def if IsScalar is false, otherwise return the generated scalar. | |
| Value * | get (const VPValue *Def, const VPLane &Lane) |
| Get the generated Value for a given VPValue and given Part and Lane. | |
| bool | hasVectorValue (const VPValue *Def) |
| bool | hasScalarValue (const VPValue *Def, VPLane Lane) |
| void | set (const VPValue *Def, Value *V, bool IsScalar=false) |
Set the generated vector Value for a given VPValue, if IsScalar is false. | |
| void | reset (const VPValue *Def, Value *V) |
Reset an existing vector value for Def and a given Part. | |
| void | set (const VPValue *Def, Value *V, const VPLane &Lane) |
Set the generated scalar V for Def and the given Lane. | |
| void | reset (const VPValue *Def, Value *V, const VPLane &Lane) |
Reset an existing scalar value for Def and a given Lane. | |
| void | setDebugLocFrom (DebugLoc DL) |
Set the debug location in the builder using the debug location DL. | |
| Value * | packScalarIntoVectorizedValue (const VPValue *Def, Value *WideValue, const VPLane &Lane) |
Insert the scalar value of Def at Lane into Lane of WideValue and return the resulting value. | |
Public Attributes | |
| const TargetTransformInfo * | TTI |
| Target Transform Info. | |
| ElementCount | VF |
| The chosen Vectorization Factor of the loop being vectorized. | |
| std::optional< VPLane > | Lane |
| Hold the index to generate specific scalar instructions. | |
| struct llvm::VPTransformState::DataState | Data |
| struct llvm::VPTransformState::CFGState | CFG |
| LoopInfo * | LI |
| Hold a pointer to LoopInfo to register new basic blocks in the loop. | |
| AssumptionCache * | AC |
| Hold a pointer to AssumptionCache to register new assumptions after replicating assume calls. | |
| IRBuilderBase & | Builder |
| Hold a reference to the IRBuilder used to generate output IR code. | |
| VPlan * | Plan |
| Pointer to the VPlan code is generated for. | |
| Loop * | CurrentParentLoop = nullptr |
| The parent loop object for the current scope, or nullptr. | |
| VPTypeAnalysis | TypeAnalysis |
| VPlan-based type analysis. | |
| VPDominatorTree | VPDT |
| VPlan-based dominator tree. | |
VPTransformState holds information passed down when "executing" a VPlan, needed for generating the output IR.
Definition at line 186 of file VPlanHelpers.h.
| VPTransformState::VPTransformState | ( | const TargetTransformInfo * | TTI, |
| ElementCount | VF, | ||
| LoopInfo * | LI, | ||
| DominatorTree * | DT, | ||
| AssumptionCache * | AC, | ||
| IRBuilderBase & | Builder, | ||
| VPlan * | Plan, | ||
| Loop * | CurrentParentLoop, | ||
| Type * | CanonicalIVTy ) |
Get the generated vector Value for a given VPValue Def if IsScalar is false, otherwise return the generated scalar.
\See set.
Definition at line 280 of file VPlan.cpp.
References assert(), B(), Builder, llvm::cast(), Data, get(), hasScalarValue(), hasVectorValue(), llvm::isa(), llvm::vputils::isSingleScalar(), llvm::vputils::onlyFirstLaneUsed(), set(), and VF.
Referenced by get(), get(), and packScalarIntoVectorizedValue().
Get the generated Value for a given VPValue and given Part and Lane.
Definition at line 248 of file VPlan.cpp.
References assert(), Builder, llvm::cast(), Data, llvm::VPLane::First, get(), llvm::VPLane::getFirstLane(), hasScalarValue(), hasVectorValue(), llvm::isa(), llvm::vputils::isSingleScalar(), Lane, llvm::VPlanPatternMatch::m_BuildVector(), llvm::PatternMatch::match(), and VF.
| Value * VPTransformState::packScalarIntoVectorizedValue | ( | const VPValue * | Def, |
| Value * | WideValue, | ||
| const VPLane & | Lane ) |
Insert the scalar value of Def at Lane into Lane of WideValue and return the resulting value.
Definition at line 362 of file VPlan.cpp.
References Builder, llvm::dyn_cast(), get(), llvm::Value::getType(), I, Lane, and VF.
Reset an existing vector value for Def and a given Part.
Definition at line 243 of file VPlanHelpers.h.
| void VPTransformState::setDebugLocFrom | ( | DebugLoc | DL | ) |
Set the debug location in the builder using the debug location DL.
Definition at line 340 of file VPlan.cpp.
References Builder, llvm::DILocation::cloneByMultiplyingDuplicationFactor(), llvm::dbgs(), DL, llvm::EnableFSDiscriminator, LLVM_DEBUG, Plan, and VF.
| AssumptionCache* llvm::VPTransformState::AC |
Hold a pointer to AssumptionCache to register new assumptions after replicating assume calls.
Definition at line 307 of file VPlanHelpers.h.
Referenced by VPTransformState().
| IRBuilderBase& llvm::VPTransformState::Builder |
Hold a reference to the IRBuilder used to generate output IR code.
Definition at line 310 of file VPlanHelpers.h.
Referenced by get(), get(), packScalarIntoVectorizedValue(), setDebugLocFrom(), and VPTransformState().
| struct llvm::VPTransformState::CFGState llvm::VPTransformState::CFG |
Referenced by VPTransformState().
| Loop* llvm::VPTransformState::CurrentParentLoop = nullptr |
The parent loop object for the current scope, or nullptr.
Definition at line 316 of file VPlanHelpers.h.
Referenced by VPTransformState().
| struct llvm::VPTransformState::DataState llvm::VPTransformState::Data |
Referenced by get(), get(), hasScalarValue(), hasVectorValue(), reset(), reset(), set(), and set().
| std::optional<VPLane> llvm::VPTransformState::Lane |
Hold the index to generate specific scalar instructions.
Null indicates that all instances are to be generated, using either scalar or vector instructions. TODO: This is now only used in asserts. Remove as follow-up.
Definition at line 201 of file VPlanHelpers.h.
Referenced by get(), hasScalarValue(), packScalarIntoVectorizedValue(), reset(), and set().
| LoopInfo* llvm::VPTransformState::LI |
Hold a pointer to LoopInfo to register new basic blocks in the loop.
Definition at line 303 of file VPlanHelpers.h.
Referenced by VPTransformState().
| VPlan* llvm::VPTransformState::Plan |
Pointer to the VPlan code is generated for.
Definition at line 313 of file VPlanHelpers.h.
Referenced by setDebugLocFrom(), and VPTransformState().
| const TargetTransformInfo* llvm::VPTransformState::TTI |
Target Transform Info.
Definition at line 192 of file VPlanHelpers.h.
Referenced by VPTransformState().
| VPTypeAnalysis llvm::VPTransformState::TypeAnalysis |
VPlan-based type analysis.
Definition at line 319 of file VPlanHelpers.h.
Referenced by VPTransformState().
| ElementCount llvm::VPTransformState::VF |
The chosen Vectorization Factor of the loop being vectorized.
Definition at line 195 of file VPlanHelpers.h.
Referenced by get(), get(), hasScalarValue(), packScalarIntoVectorizedValue(), reset(), set(), set(), setDebugLocFrom(), and VPTransformState().
| VPDominatorTree llvm::VPTransformState::VPDT |
VPlan-based dominator tree.
Definition at line 322 of file VPlanHelpers.h.
Referenced by VPTransformState().