LLVM  7.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::VPInstruction Class Reference

This is a concrete Recipe that models a single VPlan-level instruction. More...

#include "Transforms/Vectorize/VPlan.h"

Inheritance diagram for llvm::VPInstruction:
Inheritance graph
[legend]
Collaboration diagram for llvm::VPInstruction:
Collaboration graph
[legend]

Public Types

enum  { Not = Instruction::OtherOpsEnd + 1 }
 VPlan opcodes, extending LLVM IR with idiomatics instructions. More...
 
- Public Types inherited from llvm::VPUser
typedef SmallVectorImpl< VPValue * >::iterator operand_iterator
 
typedef SmallVectorImpl< VPValue * >::const_iterator const_operand_iterator
 
typedef iterator_range< operand_iteratoroperand_range
 
typedef iterator_range< const_operand_iteratorconst_operand_range
 
- Public Types inherited from llvm::VPValue
enum  { VPValueSC, VPUserSC, VPInstructionSC }
 An enumeration for keeping track of the concrete subclass of VPValue that are actually instantiated. More...
 
typedef SmallVectorImpl< VPUser * >::iterator user_iterator
 
typedef SmallVectorImpl< VPUser * >::const_iterator const_user_iterator
 
typedef iterator_range< user_iteratoruser_range
 
typedef iterator_range< const_user_iteratorconst_user_range
 
- Public Types inherited from llvm::VPRecipeBase
using VPRecipeTy = enum { VPBlendSC, VPBranchOnMaskSC, VPInstructionSC, VPInterleaveSC, VPPredInstPHISC, VPReplicateSC, VPWidenIntOrFpInductionSC, VPWidenMemoryInstructionSC, VPWidenPHISC, VPWidenSC, }
 An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiated. More...
 

Public Member Functions

 VPInstruction (unsigned Opcode, ArrayRef< VPValue *> Operands)
 
 VPInstruction (unsigned Opcode, std::initializer_list< VPValue *> Operands)
 
unsigned getOpcode () const
 
void execute (VPTransformState &State) override
 Generate the instruction. More...
 
void print (raw_ostream &O, const Twine &Indent) const override
 Print the Recipe. More...
 
void print (raw_ostream &O) const
 Print the VPInstruction. More...
 
- Public Member Functions inherited from llvm::VPUser
 VPUser ()
 
 VPUser (ArrayRef< VPValue *> Operands)
 
 VPUser (std::initializer_list< VPValue *> Operands)
 
 VPUser (const VPUser &)=delete
 
VPUseroperator= (const VPUser &)=delete
 
void addOperand (VPValue *Operand)
 
unsigned getNumOperands () const
 
VPValuegetOperand (unsigned N) const
 
operand_iterator op_begin ()
 
const_operand_iterator op_begin () const
 
operand_iterator op_end ()
 
const_operand_iterator op_end () const
 
operand_range operands ()
 
const_operand_range operands () const
 
- Public Member Functions inherited from llvm::VPValue
 VPValue (Value *UV=nullptr)
 
 VPValue (const VPValue &)=delete
 
VPValueoperator= (const VPValue &)=delete
 
unsigned getVPValueID () const
 
void printAsOperand (raw_ostream &OS) const
 
unsigned getNumUsers () const
 
void addUser (VPUser &User)
 
user_iterator user_begin ()
 
const_user_iterator user_begin () const
 
user_iterator user_end ()
 
const_user_iterator user_end () const
 
user_range users ()
 
const_user_range users () const
 
- Public Member Functions inherited from llvm::VPRecipeBase
 VPRecipeBase (const unsigned char SC)
 
virtual ~VPRecipeBase ()=default
 
unsigned getVPRecipeID () const
 
VPBasicBlockgetParent ()
 
const VPBasicBlockgetParent () const
 
void insertBefore (VPRecipeBase *InsertPos)
 Insert an unlinked recipe into a basic block immediately before the specified recipe. More...
 
iplist< VPRecipeBase >::iterator eraseFromParent ()
 This method unlinks 'this' from the containing basic block and deletes it. More...
 
- Public Member Functions inherited from llvm::ilist_node_with_parent< VPRecipeBase, VPBasicBlock >
VPRecipeBasegetPrevNode ()
 
const VPRecipeBasegetPrevNode () const
 Get the previous node, or nullptr for the list head. More...
 
VPRecipeBasegetNextNode ()
 Get the next node, or nullptr for the list tail. More...
 
const VPRecipeBasegetNextNode () const
 Get the next node, or nullptr for the list tail. More...
 
- Public Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type >
self_iterator getIterator ()
 
const_self_iterator getIterator () const
 
reverse_self_iterator getReverseIterator ()
 
const_reverse_self_iterator getReverseIterator () const
 
bool isSentinel () const
 Check whether this is the sentinel node. More...
 

Static Public Member Functions

static bool classof (const VPValue *V)
 Method to support type inquiry through isa, cast, and dyn_cast. More...
 
static bool classof (const VPRecipeBase *R)
 Method to support type inquiry through isa, cast, and dyn_cast. More...
 
- Static Public Member Functions inherited from llvm::VPUser
static bool classof (const VPValue *V)
 Method to support type inquiry through isa, cast, and dyn_cast. More...
 

Friends

class VPlanHCFGTransforms
 

Additional Inherited Members

- Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type >
using self_iterator = ilist_iterator< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type, false, false >
 
using const_self_iterator = ilist_iterator< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type, false, true >
 
using reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type, true, false >
 
using const_reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type, true, true >
 
- Protected Member Functions inherited from llvm::VPUser
 VPUser (const unsigned char SC)
 
 VPUser (const unsigned char SC, ArrayRef< VPValue *> Operands)
 
- Protected Member Functions inherited from llvm::VPValue
 VPValue (const unsigned char SC, Value *UV=nullptr)
 
ValuegetUnderlyingValue ()
 Return the underlying Value attached to this VPValue. More...
 
void setUnderlyingValue (Value *Val)
 
- Protected Member Functions inherited from llvm::ilist_node_with_parent< VPRecipeBase, VPBasicBlock >
 ilist_node_with_parent ()=default
 
- Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type >
 ilist_node_impl ()=default
 
- Protected Attributes inherited from llvm::VPValue
ValueUnderlyingVal
 

Detailed 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.

Definition at line 570 of file VPlan.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

VPlan opcodes, extending LLVM IR with idiomatics instructions.

Enumerator
Not 

Definition at line 575 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPInstruction() [1/2]

llvm::VPInstruction::VPInstruction ( unsigned  Opcode,
ArrayRef< VPValue *>  Operands 
)
inline

Definition at line 586 of file VPlan.h.

◆ VPInstruction() [2/2]

llvm::VPInstruction::VPInstruction ( unsigned  Opcode,
std::initializer_list< VPValue *>  Operands 
)
inline

Definition at line 590 of file VPlan.h.

Member Function Documentation

◆ classof() [1/2]

static bool llvm::VPInstruction::classof ( const VPValue V)
inlinestatic

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

Definition at line 594 of file VPlan.h.

References llvm::VPValue::getVPValueID(), and llvm::VPValue::VPInstructionSC.

◆ classof() [2/2]

static bool llvm::VPInstruction::classof ( const VPRecipeBase R)
inlinestatic

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

Definition at line 599 of file VPlan.h.

References llvm::VPRecipeBase::getVPRecipeID().

◆ execute()

void VPInstruction::execute ( VPTransformState State)
overridevirtual

Generate the instruction.

TODO: We currently execute only per-part unless a specific instance is provided.

Implements llvm::VPRecipeBase.

Definition at line 256 of file VPlan.cpp.

References assert(), llvm::VPTransformState::Instance, and llvm::VPTransformState::UF.

◆ getOpcode()

unsigned llvm::VPInstruction::getOpcode ( ) const
inline

Definition at line 603 of file VPlan.h.

References llvm::RISCVFenceField::O, and print().

◆ print() [1/2]

void VPInstruction::print ( raw_ostream O,
const Twine Indent 
) const
overridevirtual

Print the Recipe.

Implements llvm::VPRecipeBase.

Definition at line 262 of file VPlan.cpp.

References print().

◆ print() [2/2]

void VPInstruction::print ( raw_ostream O) const

Print the VPInstruction.

Definition at line 268 of file VPlan.cpp.

References llvm::Instruction::getOpcodeName(), and Not.

Friends And Related Function Documentation

◆ VPlanHCFGTransforms

friend class VPlanHCFGTransforms
friend

Definition at line 571 of file VPlan.h.


The documentation for this class was generated from the following files: