LLVM
15.0.0git
|
Canonical scalar induction phi of the vector loop. More...
#include "Transforms/Vectorize/VPlan.h"
Public Member Functions | |
VPCanonicalIVPHIRecipe (VPValue *StartV, DebugLoc DL) | |
~VPCanonicalIVPHIRecipe () override=default | |
void | execute (VPTransformState &State) override |
Generate the canonical scalar induction phi of the vector loop. More... | |
void | print (raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override |
Print the recipe. More... | |
const Type * | getScalarType () const |
Returns the scalar type of the induction. More... | |
bool | onlyFirstLaneUsed (const VPValue *Op) const override |
Returns true if the recipe only uses the first lane of operand Op . More... | |
![]() | |
~VPHeaderPHIRecipe () override=default | |
VPValue * | getStartValue () |
Returns the start value of the phi, if one is set. More... | |
VPValue * | getStartValue () const |
VPValue * | getBackedgeValue () |
Returns the incoming value from the loop backedge. More... | |
VPRecipeBase * | getBackedgeRecipe () |
Returns the backedge value as a recipe. More... | |
![]() | |
VPRecipeBase (const unsigned char SC, ArrayRef< VPValue * > Operands) | |
template<typename IterT > | |
VPRecipeBase (const unsigned char SC, iterator_range< IterT > Operands) | |
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 | insertBefore (VPBasicBlock &BB, iplist< VPRecipeBase >::iterator IP) |
Insert an unlinked recipe into BB immediately before the insertion point IP ;. 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... | |
Instruction * | getUnderlyingInstr () |
Returns the underlying instruction, if the recipe is a VPValue or nullptr otherwise. More... | |
const Instruction * | getUnderlyingInstr () const |
bool | mayHaveSideEffects () const |
Returns true if the recipe may have side-effects. More... | |
bool | isPhi () const |
Returns true for PHI-like recipes. More... | |
bool | mayReadFromMemory () const |
Returns true if the recipe may read from memory. More... | |
bool | mayWriteToMemory () const |
Returns true if the recipe may write to memory. More... | |
bool | mayReadOrWriteMemory () const |
Returns true if the recipe may read from or write to memory. More... | |
![]() | |
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 * | getVPSingleValue () |
Returns the only VPValue defined by the VPDef. More... | |
const VPValue * | getVPSingleValue () const |
VPValue * | getVPValue (unsigned I) |
Returns the VPValue with index I defined by the VPDef. More... | |
const VPValue * | getVPValue (unsigned I) 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 ()=delete | |
VPUser (const VPUser &)=delete | |
VPUser & | operator= (const VPUser &)=delete |
virtual | ~VPUser () |
VPUserID | getVPUserID () const |
void | addOperand (VPValue *Operand) |
unsigned | getNumOperands () const |
VPValue * | getOperand (unsigned N) const |
void | setOperand (unsigned I, VPValue *New) |
void | removeLastOperand () |
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 |
virtual bool | usesScalars (const VPValue *Op) const |
Returns true if the VPUser uses scalars of operand Op . More... | |
![]() | |
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 () |
const VPDef * | getDef () const |
Value * | getLiveInIRValue () |
Returns the underlying IR value, if this VPValue is defined outside the scope of VPlan. More... | |
const Value * | getLiveInIRValue () const |
Static Public Member Functions | |
static bool | classof (const VPDef *D) |
Method to support type inquiry through isa, cast, and dyn_cast. More... | |
static bool | classof (const VPHeaderPHIRecipe *D) |
static bool | classof (const VPValue *V) |
![]() | |
static bool | classof (const VPRecipeBase *B) |
Method to support type inquiry through isa, cast, and dyn_cast. More... | |
static bool | classof (const VPValue *V) |
![]() | |
static bool | classof (const VPDef *D) |
Method to support type inquiry through isa, cast, and dyn_cast. More... | |
static bool | classof (const VPUser *U) |
![]() | |
static bool | classof (const VPDef *Recipe) |
Method to support type inquiry through isa, cast, and dyn_cast. More... | |
Additional Inherited Members | |
![]() | |
using | VPRecipeTy = enum { VPBranchOnMaskSC, VPExpandSCEVSC, VPInstructionSC, VPInterleaveSC, VPReductionSC, VPReplicateSC, VPScalarIVStepsSC, VPWidenCallSC, VPWidenCanonicalIVSC, VPWidenGEPSC, VPWidenMemoryInstructionSC, VPWidenSC, VPWidenSelectSC, VPBlendSC, VPCanonicalIVPHISC, VPFirstOrderRecurrencePHISC, VPWidenPHISC, VPWidenIntOrFpInductionSC, VPWidenPointerInductionSC, VPPredInstPHISC, VPReductionPHISC, VPFirstPHISC=VPBlendSC, VPLastPHISC=VPReductionPHISC, } |
An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiated. More... | |
![]() | |
enum | VPUserID { VPUserID::Recipe, VPUserID::LiveOut } |
Subclass identifier (for isa/dyn_cast). 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, VPVWidenCanonicalIVSC, VPVWidenGEPSC, VPVWidenSelectSC, VPVBlendSC, VPVCanonicalIVPHISC, VPVFirstOrderRecurrencePHISC, VPVWidenPHISC, VPVWidenIntOrFpInductionSC, VPVWidenPointerInductionSC, VPVPredInstPHI, VPVReductionPHISC } |
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 |
![]() | |
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 > |
![]() | |
VPHeaderPHIRecipe (unsigned char VPVID, unsigned char VPDefID, PHINode *Phi, VPValue *Start=nullptr) | |
![]() | |
ilist_node_with_parent ()=default | |
![]() | |
ilist_node_impl ()=default | |
![]() | |
void | printOperands (raw_ostream &O, VPSlotTracker &SlotTracker) const |
Print the operands to O . More... | |
VPUser (ArrayRef< VPValue * > Operands, VPUserID ID) | |
VPUser (std::initializer_list< VPValue * > Operands, VPUserID ID) | |
template<typename IterT > | |
VPUser (iterator_range< IterT > Operands, VPUserID ID) | |
![]() | |
VPValue (const unsigned char SC, Value *UV=nullptr, VPDef *Def=nullptr) | |
void | setUnderlyingValue (Value *Val) |
![]() | |
Value * | UnderlyingVal |
VPDef * | Def |
Pointer to the VPDef that defines this VPValue. More... | |
Canonical scalar induction phi of the vector loop.
Starting at the specified start value (either 0 or the resume value when vectorizing the epilogue loop). VPWidenCanonicalIVRecipe represents the vector version of the canonical induction variable.
|
overridedefault |
|
inlinestatic |
Definition at line 1838 of file VPlan.h.
References llvm::VPValue::getVPValueID(), and llvm::VPValue::VPVCanonicalIVPHISC.
|
overridevirtual |
Generate the canonical scalar induction phi of the vector loop.
Implements llvm::VPHeaderPHIRecipe.
Definition at line 592 of file VPlanRecipes.cpp.
References llvm::PHINode::addIncoming(), llvm::VPTransformState::CFG, llvm::PHINode::Create(), llvm::BasicBlock::getFirstInsertionPt(), llvm::VPValue::getLiveInIRValue(), llvm::VPTransformState::CFGState::getPreheaderBBFor(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPTransformState::CFGState::PrevBB, llvm::VPTransformState::set(), llvm::Instruction::setDebugLoc(), and llvm::VPTransformState::UF.
Returns the scalar type of the induction.
Definition at line 1852 of file VPlan.h.
References llvm::VPValue::getLiveInIRValue(), llvm::VPUser::getOperand(), and llvm::Value::getType().
|
inlineoverridevirtual |
Returns true if the recipe only uses the first lane of operand Op
.
Reimplemented from llvm::VPUser.
Definition at line 1857 of file VPlan.h.
References assert(), llvm::is_contained(), and llvm::VPUser::operands().
|
overridevirtual |
Print the recipe.
Implements llvm::VPHeaderPHIRecipe.
Definition at line 605 of file VPlanRecipes.cpp.
References llvm::RISCVFenceField::O, and llvm::VPValue::printAsOperand().