class VPInstruction
Declaration
class VPInstruction : public VPRecipeBase, public VPValue { /* full declaration omitted */ };
Description
This is a concrete Recipe that models a single VPlan-level instruction. While as any Recipe it may generate a sequence of IR instructions when executed, these instructions would always form a single-def expression as the VPInstruction is also a single def-use vertex.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:771
Inherits from: VPRecipeBase, VPValue
Member Variables
- private llvm::VPInstruction::OpcodeTy Opcode
- private llvm::FastMathFlags FMF
- private llvm::DebugLoc DL
- private const std::string Name
- An optional name that can be used for the generated IR instruction.
Inherited from VPValue:
Method Overview
- public VPInstruction(unsigned int Opcode, ArrayRef<llvm::VPValue *> Operands, llvm::DebugLoc DL, const llvm::Twine & Name = "")
- public VPInstruction(unsigned int Opcode, std::initializer_list<VPValue *> Operands, llvm::DebugLoc DL = {}, const llvm::Twine & Name = "")
- public static inline bool classof(const llvm::VPValue * V)
- public static inline bool classof(const llvm::VPDef * R)
- public static inline bool classof(const llvm::VPUser * U)
- public static inline bool classof(const llvm::VPRecipeBase * R)
- public llvm::VPInstruction * clone() const
- public void dump() const
- public void execute(llvm::VPTransformState & State)
- private void generateInstruction(llvm::VPTransformState & State, unsigned int Part)
- public unsigned int getOpcode() const
- public bool hasResult() const
- public bool mayWriteToMemory() 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 setFastMathFlags(llvm::FastMathFlags FMFNew)
- protected void setUnderlyingInstr(llvm::Instruction * I)
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
¶VPInstruction(unsigned int Opcode,
ArrayRef<llvm::VPValue*> Operands,
llvm::DebugLoc DL,
const llvm::Twine& Name = "")
VPInstruction(unsigned int Opcode,
ArrayRef<llvm::VPValue*> Operands,
llvm::DebugLoc DL,
const llvm::Twine& Name = "")
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:812
Parameters
- unsigned int Opcode
- ArrayRef<llvm::VPValue*> Operands
- llvm::DebugLoc DL
- const llvm::Twine& Name = ""
¶VPInstruction(
unsigned int Opcode,
std::initializer_list<VPValue*> Operands,
llvm::DebugLoc DL = {},
const llvm::Twine& Name = "")
VPInstruction(
unsigned int Opcode,
std::initializer_list<VPValue*> Operands,
llvm::DebugLoc DL = {},
const llvm::Twine& Name = "")
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:818
Parameters
- unsigned int Opcode
- std::initializer_list<VPValue*> Operands
- llvm::DebugLoc DL = {}
- const llvm::Twine& Name = ""
¶static inline bool classof(const llvm::VPValue* V)
static inline bool classof(const llvm::VPValue* V)
Description
Method to support type inquiry through isa, cast, and dyn_cast.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:823
Parameters
- const llvm::VPValue* V
¶static inline bool classof(const llvm::VPDef* R)
static inline bool classof(const llvm::VPDef* R)
Description
Method to support type inquiry through isa, cast, and dyn_cast.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:833
Parameters
- const llvm::VPDef* R
¶static inline bool classof(const llvm::VPUser* U)
static inline bool classof(const llvm::VPUser* U)
Description
Extra classof implementations to allow directly casting from VPUser -> VPInstruction.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:839
Parameters
- const llvm::VPUser* U
¶static inline bool classof(
const llvm::VPRecipeBase* R)
static inline bool classof(
const llvm::VPRecipeBase* R)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:843
Parameters
- const llvm::VPRecipeBase* R
¶llvm::VPInstruction* clone() const
llvm::VPInstruction* clone() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:827
¶void dump() const
void dump() const
Description
Print the VPInstruction to dbgs() (for debugging).
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:860
¶void execute(llvm::VPTransformState& State)
void execute(llvm::VPTransformState& State)
Description
Generate the instruction. TODO: We currently execute only per-part unless a specific instance is provided.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:852
Parameters
- llvm::VPTransformState& State
¶void generateInstruction(
llvm::VPTransformState& State,
unsigned int Part)
void generateInstruction(
llvm::VPTransformState& State,
unsigned int Part)
Description
Utility method serving execute(): generates a single instance of the modeled instruction.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:806
Parameters
- llvm::VPTransformState& State
- unsigned int Part
¶unsigned int getOpcode() const
unsigned int getOpcode() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:847
¶bool hasResult() const
bool hasResult() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:871
¶bool mayWriteToMemory() const
bool mayWriteToMemory() const
Description
Return true if this instruction may modify memory.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:864
¶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:897
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 VPInstruction to \p O.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:856
Parameters
- llvm::raw_ostream& O
- const llvm::Twine& Indent
- llvm::VPSlotTracker& SlotTracker
¶void setFastMathFlags(llvm::FastMathFlags FMFNew)
void setFastMathFlags(llvm::FastMathFlags FMFNew)
Description
Set the fast-math flags.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:894
Parameters
- llvm::FastMathFlags FMFNew
¶void setUnderlyingInstr(llvm::Instruction* I)
void setUnderlyingInstr(llvm::Instruction* I)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:809