LLVM
12.0.0git
|
This is a concrete Recipe that models a single VPlan-level instruction. More...
#include "Transforms/Vectorize/VPlan.h"
Public Types | |
enum | { Not = Instruction::OtherOpsEnd + 1, ICmpULE, SLPLoad, SLPStore, ActiveLaneMask } |
VPlan opcodes, extending LLVM IR with idiomatics instructions. More... | |
![]() | |
using | VPRecipeTy = enum { VPBlendSC, VPBranchOnMaskSC, VPInstructionSC, VPInterleaveSC, VPPredInstPHISC, VPReductionSC, VPReplicateSC, VPWidenCallSC, VPWidenCanonicalIVSC, VPWidenGEPSC, VPWidenIntOrFpInductionSC, VPWidenMemoryInstructionSC, VPWidenPHISC, VPWidenSC, VPWidenSelectSC } |
An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiated. More... | |
![]() | |
typedef SmallVectorImpl< VPValue * >::iterator | operand_iterator |
typedef SmallVectorImpl< VPValue * >::const_iterator | const_operand_iterator |
typedef iterator_range< operand_iterator > | operand_range |
typedef iterator_range< const_operand_iterator > | const_operand_range |
![]() | |
enum | { VPValueSC, VPVInstructionSC, VPVMemoryInstructionSC, VPVReductionSC, VPVReplicateSC, VPVWidenSC, VPVWidenCallSC, VPVWidenGEPSC, VPVWidenSelectSC } |
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_iterator > | user_range |
typedef iterator_range< const_user_iterator > | const_user_range |
Public Member Functions | |
VPInstruction (unsigned Opcode, ArrayRef< VPValue * > Operands) | |
VPInstruction (unsigned Opcode, ArrayRef< VPInstruction * > Operands) | |
VPInstruction (unsigned Opcode, std::initializer_list< VPValue * > Operands) | |
VPInstruction * | clone () const |
unsigned | getOpcode () const |
void | execute (VPTransformState &State) override |
Generate the instruction. More... | |
void | print (raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override |
Print the VPInstruction to O . More... | |
void | dump () const |
Print the VPInstruction to dbgs() (for debugging). More... | |
bool | mayWriteToMemory () const |
Return true if this instruction may modify memory. More... | |
bool | hasResult () const |
![]() | |
VPRecipeBase (const unsigned char SC) | |
virtual | ~VPRecipeBase ()=default |
VPBasicBlock * | getParent () |
const VPBasicBlock * | getParent () const |
void | insertBefore (VPRecipeBase *InsertPos) |
Insert an unlinked recipe into a basic block immediately before the specified recipe. More... | |
void | insertAfter (VPRecipeBase *InsertPos) |
Insert an unlinked Recipe into a basic block immediately after the specified Recipe. More... | |
void | moveAfter (VPRecipeBase *MovePos) |
Unlink this recipe from its current VPBasicBlock and insert it into the VPBasicBlock that MovePos lives in, right after MovePos. More... | |
void | moveBefore (VPBasicBlock &BB, iplist< VPRecipeBase >::iterator I) |
Unlink this recipe and insert into BB before I. More... | |
void | removeFromParent () |
This method unlinks 'this' from the containing basic block, but does not delete it. More... | |
iplist< VPRecipeBase >::iterator | eraseFromParent () |
This method unlinks 'this' from the containing basic block and deletes it. More... | |
VPUser * | toVPUser () |
Returns a pointer to a VPUser, if the recipe inherits from VPUser or nullptr otherwise. More... | |
Instruction * | getUnderlyingInstr () |
Returns the underlying instruction, if the recipe is a VPValue or nullptr otherwise. More... | |
const Instruction * | getUnderlyingInstr () const |
![]() | |
VPRecipeBase * | getPrevNode () |
const VPRecipeBase * | getPrevNode () const |
Get the previous node, or nullptr for the list head. More... | |
VPRecipeBase * | getNextNode () |
Get the next node, or nullptr for the list tail. More... | |
const VPRecipeBase * | getNextNode () const |
Get the next node, or nullptr for the list tail. More... | |
![]() | |
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... | |
![]() | |
VPDef (const unsigned char SC) | |
virtual | ~VPDef () |
VPValue * | getVPValue (unsigned I=0) |
Returns the VPValue with index I defined by the VPDef. More... | |
const VPValue * | getVPValue (unsigned I=0) const |
ArrayRef< VPValue * > | definedValues () |
Returns an ArrayRef of the values defined by the VPDef. More... | |
ArrayRef< VPValue * > | definedValues () const |
Returns an ArrayRef of the values defined by the VPDef. More... | |
unsigned | getNumDefinedValues () const |
Returns the number of values defined by the VPDef. More... | |
unsigned | getVPDefID () const |
void | dump () const |
Dump the VPDef to stderr (for debugging). More... | |
![]() | |
VPUser () | |
VPUser (ArrayRef< VPValue * > Operands) | |
VPUser (std::initializer_list< VPValue * > Operands) | |
template<typename IterT > | |
VPUser (iterator_range< IterT > Operands) | |
VPUser (const VPUser &)=delete | |
VPUser & | operator= (const VPUser &)=delete |
virtual | ~VPUser () |
void | addOperand (VPValue *Operand) |
unsigned | getNumOperands () const |
VPValue * | getOperand (unsigned N) const |
void | setOperand (unsigned I, VPValue *New) |
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 |
![]() | |
Value * | getUnderlyingValue () |
Return the underlying Value attached to this VPValue. More... | |
const Value * | getUnderlyingValue () const |
VPValue (Value *UV=nullptr, VPDef *Def=nullptr) | |
VPValue (const VPValue &)=delete | |
VPValue & | operator= (const VPValue &)=delete |
virtual | ~VPValue () |
unsigned | getVPValueID () const |
void | printAsOperand (raw_ostream &OS, VPSlotTracker &Tracker) const |
void | print (raw_ostream &OS, VPSlotTracker &Tracker) const |
void | dump () const |
Dump the value to stderr (for debugging). More... | |
unsigned | getNumUsers () const |
void | addUser (VPUser &User) |
void | removeUser (VPUser &User) |
Remove a single User from the list of users. More... | |
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 |
bool | hasMoreThanOneUniqueUser () |
Returns true if the value has more than one unique user. More... | |
void | replaceAllUsesWith (VPValue *New) |
VPDef * | getDef () |
Value * | getLiveInIRValue () |
Returns the underlying IR value, if this VPValue is defined outside the scope of VPlan. 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 VPDef *R) |
Method to support type inquiry through isa, cast, and dyn_cast. More... | |
![]() | |
static bool | classof (const VPDef *D) |
Method to support type inquiry through isa, cast, and dyn_cast. More... | |
![]() | |
static bool | classof (const VPDef *Recipe) |
Method to support type inquiry through isa, cast, and dyn_cast. More... | |
Protected Member Functions | |
void | setUnderlyingInstr (Instruction *I) |
![]() | |
ilist_node_with_parent ()=default | |
![]() | |
ilist_node_impl ()=default | |
![]() | |
void | printOperands (raw_ostream &O, VPSlotTracker &SlotTracker) const |
Print the operands to O . More... | |
![]() | |
VPValue (const unsigned char SC, Value *UV=nullptr, VPDef *Def=nullptr) | |
void | setUnderlyingValue (Value *Val) |
Friends | |
class | VPlanSlp |
Additional Inherited Members | |
![]() | |
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 > |
![]() | |
Value * | UnderlyingVal |
VPDef * | Def |
Pointer to the VPDef that defines this VPValue. More... | |
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.
anonymous enum |
|
inline |
Method to support type inquiry through isa, cast, and dyn_cast.
Definition at line 752 of file VPlan.h.
References llvm::VPValue::getVPValueID(), and llvm::VPValue::VPVInstructionSC.
Method to support type inquiry through isa, cast, and dyn_cast.
Definition at line 762 of file VPlan.h.
References llvm::RISCVFenceField::R.
|
inline |
Definition at line 756 of file VPlan.h.
References Operands, llvm::VPUser::operands(), and VPInstruction().
void VPInstruction::dump | ( | ) | const |
Print the VPInstruction to dbgs() (for debugging).
Definition at line 505 of file VPlan.cpp.
References llvm::dbgs(), llvm::VPRecipeBase::getParent(), and print().
|
overridevirtual |
Generate the instruction.
TODO: We currently execute only per-part unless a specific instance is provided.
Implements llvm::VPRecipeBase.
Definition at line 499 of file VPlan.cpp.
References assert(), llvm::VPTransformState::Instance, and llvm::VPTransformState::UF.
|
inline |
Definition at line 766 of file VPlan.h.
Referenced by hasResult(), and print().
|
inline |
Definition at line 788 of file VPlan.h.
References getOpcode(), llvm::MipsISD::Ret, and llvm::SPII::Store.
Referenced by print().
|
inline |
Return true if this instruction may modify memory.
Definition at line 781 of file VPlan.h.
References llvm::MCID::Call, SLPStore, and llvm::SPII::Store.
|
overridevirtual |
Print the VPInstruction to O
.
Implements llvm::VPDef.
Definition at line 510 of file VPlan.cpp.
References ActiveLaneMask, getOpcode(), llvm::Instruction::getOpcodeName(), hasResult(), ICmpULE, Not, llvm::RISCVFenceField::O, llvm::VPUser::operands(), llvm::VPValue::printAsOperand(), SLPLoad, and SLPStore.
Referenced by dump().
|
inlineprotected |
Definition at line 734 of file VPlan.h.
References I, and llvm::VPValue::setUnderlyingValue().