LLVM: llvm::VPTransformState Struct Reference (original) (raw)

[VPTransformState](structllvm%5F1%5F1VPTransformState.html "VPTransformState holds information passed down when "executing" a VPlan, needed for generating the ou...") holds information passed down when "executing" a VPlan, needed for generating the output IR. More...

#include "[Transforms/Vectorize/VPlanHelpers.h](VPlanHelpers%5F8h%5Fsource.html)"

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](structllvm%5F1%5F1VPTransformState.html "VPTransformState holds information passed down when "executing" a VPlan, needed for generating the ou...") holds information passed down when "executing" a VPlan, needed for generating the output IR.

Definition at line 190 of file VPlanHelpers.h.

get() [1/2]

Get the generated vector Value for a given VPValue Def if IsScalar is false, otherwise return the generated scalar.

\See set.

Definition at line 263 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() [2/2]

Get the generated Value for a given VPValue and given Part and Lane.

Definition at line 231 of file VPlan.cpp.

References assert(), Builder, llvm::cast(), Data, llvm::VPLane::First, get(), llvm::VPLane::getFirstLane(), hasScalarValue(), hasVectorValue(), llvm::vputils::isSingleScalar(), Lane, llvm::VPlanPatternMatch::m_BuildVector(), llvm::PatternMatch::match(), and VF.

hasScalarValue()

hasVectorValue()

packScalarIntoVectorizedValue()

reset() [1/2]

Reset an existing vector value for Def and a given Part.

Definition at line 246 of file VPlanHelpers.h.

References assert(), and Data.

reset() [2/2]

set() [1/2]

set() [2/2]

setDebugLocFrom()

void VPTransformState::setDebugLocFrom ( DebugLoc DL )

AC

Builder

CFG

CurrentParentLoop

Loop* llvm::VPTransformState::CurrentParentLoop = nullptr

Data

Lane

std::optional<VPLane> llvm::VPTransformState::Lane

LI

Plan

VPlan* llvm::VPTransformState::Plan

TTI

TypeAnalysis

VF

VPDT


The documentation for this struct was generated from the following files: