LLVM 22.0.0git
|
Helper type to provide functions to access incoming values and blocks for phi-like recipes. More...
#include "Transforms/Vectorize/VPlan.h"
Public Types | |
using | const_incoming_blocks_range = iterator_range< mapped_iterator< detail::index_iterator, std::function< const VPBasicBlock *(size_t)> > > |
Public Member Functions | |
virtual | ~VPPhiAccessors ()=default |
VPValue * | getIncomingValue (unsigned Idx) const |
Returns the incoming VPValue with index Idx . | |
const VPBasicBlock * | getIncomingBlock (unsigned Idx) const |
Returns the incoming block with index Idx . | |
virtual unsigned | getNumIncoming () const |
Returns the number of incoming values, also number of incoming blocks. | |
VPUser::const_operand_range | incoming_values () const |
Returns an interator range over the incoming values. | |
const_incoming_blocks_range | incoming_blocks () const |
Returns an iterator range over the incoming blocks. | |
detail::zippy< llvm::detail::zip_first, VPUser::const_operand_range, const_incoming_blocks_range > | incoming_values_and_blocks () const |
Returns an iterator range over pairs of incoming values and corresponding incoming blocks. | |
void | removeIncomingValueFor (VPBlockBase *IncomingBlock) const |
Removes the incoming value for IncomingBlock , which must be a predecessor. | |
void | printPhiOperands (raw_ostream &O, VPSlotTracker &SlotTracker) const |
Print the recipe. | |
Protected Member Functions | |
virtual const VPRecipeBase * | getAsRecipe () const =0 |
Return a VPRecipeBase* to the current object. | |
Helper type to provide functions to access incoming values and blocks for phi-like recipes.
using llvm::VPPhiAccessors::const_incoming_blocks_range = iterator_range<mapped_iterator< detail::index_iterator, std::function<const VPBasicBlock *(size_t)> >> |
|
virtualdefault |
|
protectedpure virtual |
Return a VPRecipeBase* to the current object.
Implemented in llvm::VPPhi, llvm::VPIRPhi, llvm::VPHeaderPHIRecipe, and llvm::VPWidenPHIRecipe.
Referenced by getIncomingBlock(), getIncomingValue(), getNumIncoming(), incoming_values(), printPhiOperands(), and removeIncomingValueFor().
|
inline |
Returns the incoming block with index Idx
.
Definition at line 3783 of file VPlan.h.
References getAsRecipe(), llvm::VPBasicBlock::getCFGPredecessor(), llvm::VPRecipeBase::getParent(), and Idx.
Referenced by llvm::VPPhi::execute(), incoming_blocks(), and printPhiOperands().
Returns the incoming VPValue with index Idx
.
Definition at line 1242 of file VPlan.h.
References getAsRecipe(), llvm::VPUser::getOperand(), and Idx.
Referenced by llvm::VPPhi::execute().
|
inlinevirtual |
Returns the number of incoming values, also number of incoming blocks.
Reimplemented in llvm::VPWidenInductionRecipe, llvm::VPWidenIntOrFpInductionRecipe, and llvm::VPReductionPHIRecipe.
Definition at line 1250 of file VPlan.h.
References getAsRecipe(), and llvm::VPUser::getNumOperands().
Referenced by llvm::VPPhi::execute(), incoming_blocks(), and incoming_values().
|
inline |
Returns an iterator range over the incoming blocks.
Definition at line 1264 of file VPlan.h.
References getIncomingBlock(), getNumIncoming(), Idx, and llvm::map_range().
Referenced by incoming_values_and_blocks().
|
inline |
Returns an interator range over the incoming values.
Definition at line 1255 of file VPlan.h.
References getAsRecipe(), getNumIncoming(), and llvm::make_range().
Referenced by incoming_values_and_blocks().
|
inline |
Returns an iterator range over pairs of incoming values and corresponding incoming blocks.
Definition at line 1275 of file VPlan.h.
References incoming_blocks(), incoming_values(), and llvm::zip_equal().
Referenced by llvm::InnerLoopVectorizer::fixNonInductionPHIs(), and llvm::VPIRPhi::print().
void VPPhiAccessors::printPhiOperands | ( | raw_ostream & | O, |
VPSlotTracker & | SlotTracker | ||
) | const |
Print the recipe.
Definition at line 1546 of file VPlanRecipes.cpp.
References llvm::enumerate(), getAsRecipe(), getIncomingBlock(), llvm::interleaveComma(), and llvm::VPBlockBase::printAsOperand().
Referenced by llvm::VPPhi::print(), and llvm::VPWidenPHIRecipe::print().
void VPPhiAccessors::removeIncomingValueFor | ( | VPBlockBase * | IncomingBlock | ) | const |
Removes the incoming value for IncomingBlock
, which must be a predecessor.
Definition at line 1537 of file VPlanRecipes.cpp.
References assert(), and getAsRecipe().