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:

protected UnderlyingVal
protected Def

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:

Inherited from VPRecipeBase:

Inherited from VPUser:

Inherited from VPDef:

Methods

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 = "")

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)

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)

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)

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)

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

Parameters

const llvm::VPRecipeBase* R

llvm::VPInstruction* clone() const

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

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)

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)

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

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

bool hasResult() const

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

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

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

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)

Description

Set the fast-math flags.

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

Parameters

llvm::FastMathFlags FMFNew

void setUnderlyingInstr(llvm::Instruction* I)

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

Parameters

llvm::Instruction* I