class VPReplicateRecipe

Declaration

class VPReplicateRecipe : public VPRecipeBase, public VPValue { /* full declaration omitted */ };

Description

VPReplicateRecipe replicates a given instruction producing multiple scalar copies of the original scalar type, one per lane, instead of producing a single copy of widened type for all lanes. If the instruction is known to be uniform only one copy, per lane zero, will be generated.

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

Inherits from: VPRecipeBase, VPValue

Member Variables

private bool IsUniform
Indicator if only a single replica per lane is needed.
private bool IsPredicated
Indicator if the replicas are also predicated.
private bool AlsoPack
Indicator if the scalar values should also be packed into a vector.

Inherited from VPValue:

protected UnderlyingVal
protected Def

Method Overview

  • public template <typename IterT> VPReplicateRecipe(llvm::Instruction * I, iterator_range<IterT> Operands, bool IsUniform, bool IsPredicated = false)
  • public static inline bool classof(const llvm::VPDef * D)
  • public static inline bool classof(const llvm::VPValue * V)
  • public void execute(llvm::VPTransformState & State)
  • public bool isPacked() const
  • public bool isPredicated() const
  • public bool isUniform() const
  • public bool onlyFirstLaneUsed(const llvm::VPValue * Op) const
  • public void print(llvm::raw_ostream & O, const llvm::Twine & Indent, llvm::VPSlotTracker & SlotTracker) const
  • public void setAlsoPack(bool Pack)
  • public bool usesScalars(const llvm::VPValue * Op) const
  • public ~VPReplicateRecipe()

Inherited from VPValue:

Inherited from VPRecipeBase:

Inherited from VPUser:

Inherited from VPDef:

Methods

template <typename IterT>
VPReplicateRecipe(llvm::Instruction* I,
                  iterator_range<IterT> Operands,
                  bool IsUniform,
                  bool IsPredicated = false)

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

Templates

IterT

Parameters

llvm::Instruction* I
iterator_range<IterT> Operands
bool IsUniform
bool IsPredicated = false

static inline bool classof(const llvm::VPDef* D)

Description

Method to support type inquiry through isa, cast, and dyn_cast.

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

Parameters

const llvm::VPDef* D

static inline bool classof(const llvm::VPValue* V)

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

Parameters

const llvm::VPValue* V

void execute(llvm::VPTransformState& State)

Description

Generate replicas of the desired Ingredient. Replicas will be generated for all parts and lanes unless a specific part and lane are specified in the \p State.

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

Parameters

llvm::VPTransformState& State

bool isPacked() const

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

bool isPredicated() const

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

bool isUniform() const

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

bool onlyFirstLaneUsed(
    const llvm::VPValue* Op) const

Description

Returns true if the recipe only uses the first lane of operand \p Op.

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

Parameters

const llvm::VPValue* Op

void print(llvm::raw_ostream& O,
           const llvm::Twine& Indent,
           llvm::VPSlotTracker& SlotTracker) const

Description

Print the recipe.

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

Parameters

llvm::raw_ostream& O
const llvm::Twine& Indent
llvm::VPSlotTracker& SlotTracker

void setAlsoPack(bool Pack)

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

Parameters

bool Pack

bool usesScalars(const llvm::VPValue* Op) const

Description

Returns true if the recipe uses scalars of operand \p Op.

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

Parameters

const llvm::VPValue* Op

~VPReplicateRecipe()

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