struct VPTransformState

Declaration

struct VPTransformState { /* full declaration omitted */ };

Description

VPTransformState holds information passed down when "executing" a VPlan, needed for generating the output IR.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:236

Member Variables

public unsigned int VF
The chosen Vectorization and Unroll Factors of the loop being vectorized.
public unsigned int UF
public Optional<llvm::VPIteration> Instance
Hold the indices to generate specific scalar instructions. Null indicates that all instances are to be generated, using either scalar or vector instructions.
public struct DataState Data
public struct CFGState CFG
public llvm::LoopInfo* LI
Hold a pointer to LoopInfo to register new basic blocks in the loop.
public llvm::DominatorTree* DT
Hold a pointer to Dominator Tree to register new basic blocks in the loop.
public IRBuilder<>& Builder
Hold a reference to the IRBuilder used to generate output IR code.
public llvm::VectorizerValueMap& ValueMap
Hold a reference to the Value state information used when generating the Values of the output IR.
public llvm::VPValue2ValueTy VPValue2Value
Hold a reference to a mapping between VPValues in VPlan and original Values they correspond to.
public llvm::Value* TripCount = nullptr
Hold the trip count of the scalar loop.
public llvm::InnerLoopVectorizer* ILV
Hold a pointer to InnerLoopVectorizer to reuse its IR generation methods.
public llvm::VPCallback& Callback

Method Overview

  • public VPTransformState(unsigned int VF, unsigned int UF, llvm::LoopInfo * LI, llvm::DominatorTree * DT, IRBuilder<> & Builder, llvm::VectorizerValueMap & ValueMap, llvm::InnerLoopVectorizer * ILV, llvm::VPCallback & Callback)
  • public llvm::Value * get(llvm::VPValue * Def, unsigned int Part)
  • public llvm::Value * get(llvm::VPValue * Def, const llvm::VPIteration & Instance)
  • public void set(llvm::VPValue * Def, llvm::Value * V, unsigned int Part)

Methods

VPTransformState(
    unsigned int VF,
    unsigned int UF,
    llvm::LoopInfo* LI,
    llvm::DominatorTree* DT,
    IRBuilder<>& Builder,
    llvm::VectorizerValueMap& ValueMap,
    llvm::InnerLoopVectorizer* ILV,
    llvm::VPCallback& Callback)

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:237

Parameters

unsigned int VF
unsigned int UF
llvm::LoopInfo* LI
llvm::DominatorTree* DT
IRBuilder<>& Builder
llvm::VectorizerValueMap& ValueMap
llvm::InnerLoopVectorizer* ILV
llvm::VPCallback& Callback

llvm::Value* get(llvm::VPValue* Def,
                 unsigned int Part)

Description

Get the generated Value for a given VPValue and a given Part. Note that as some Defs are still created by ILV and managed in its ValueMap, this method will delegate the call to ILV in such cases in order to provide callers a consistent API.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:266

Parameters

llvm::VPValue* Def
unsigned int Part

llvm::Value* get(
    llvm::VPValue* Def,
    const llvm::VPIteration& Instance)

Description

Get the generated Value for a given VPValue and given Part and Lane. Note that as per-lane Defs are still created by ILV and managed in its ValueMap this method currently just delegates the call to ILV.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:277

Parameters

llvm::VPValue* Def
const llvm::VPIteration& Instance

void set(llvm::VPValue* Def,
         llvm::Value* V,
         unsigned int Part)

Description

Set the generated Value for a given VPValue and a given Part.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:282

Parameters

llvm::VPValue* Def
llvm::Value* V
unsigned int Part