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:
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:
- public addUser
- public dump
- public getDef
- public getDef
- public getLiveInIRValue
- public getLiveInIRValue
- public getNumUsers
- public getUnderlyingValue
- public getUnderlyingValue
- public getVPValueID
- public hasMoreThanOneUniqueUser
- public print
- public printAsOperand
- public removeUser
- public replaceAllUsesWith
- protected setUnderlyingValue
- public user_begin
- public user_begin
- public user_end
- public user_end
- public users
- public users
Inherited from VPRecipeBase:
- public classof
- public classof
- public eraseFromParent
- public execute
- public getParent
- public getParent
- public getUnderlyingInstr
- public getUnderlyingInstr
- public insertAfter
- public insertBefore
- public insertBefore
- public isPhi
- public mayHaveSideEffects
- public mayReadFromMemory
- public mayReadOrWriteMemory
- public mayWriteToMemory
- public moveAfter
- public moveBefore
- public removeFromParent
Inherited from VPUser:
- public addOperand
- public classof
- public getNumOperands
- public getOperand
- public getVPUserID
- public onlyFirstLaneUsed
- public op_begin
- public op_begin
- public op_end
- public op_end
- public operands
- public operands
- protected printOperands
- public removeLastOperand
- public setOperand
- public usesScalars
Inherited from VPDef:
- public definedValues
- public definedValues
- public dump
- public getNumDefinedValues
- public getVPDefID
- public getVPSingleValue
- public getVPSingleValue
- public getVPValue
- public getVPValue
- public print
Methods
¶template <typename IterT>
VPReplicateRecipe(llvm::Instruction* I,
iterator_range<IterT> Operands,
bool IsUniform,
bool IsPredicated = false)
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)
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)
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)
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
bool isPacked() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:1601
¶bool isPredicated() const
bool isPredicated() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:1603
¶bool isUniform() const
bool isUniform() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:1599
¶bool onlyFirstLaneUsed(
const llvm::VPValue* Op) const
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
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)
void setAlsoPack(bool Pack)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:1591
Parameters
- bool Pack
¶bool usesScalars(const llvm::VPValue* Op) const
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()
~VPReplicateRecipe()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:1575