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 |
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.
|
virtualdefault |
|
protectedpure virtual |
Return a VPRecipeBase* to the current object.
Implemented in llvm::VPHeaderPHIRecipe, llvm::VPIRPhi, llvm::VPPhi, and llvm::VPWidenPHIRecipe.
Referenced by getIncomingBlock(), getIncomingValue(), getNumIncoming(), incoming_values(), printPhiOperands(), and removeIncomingValueFor().
|
inline |
Returns the incoming block with index Idx
.
Definition at line 3894 of file VPlan.h.
References getAsRecipe(), llvm::VPBasicBlock::getCFGPredecessor(), and llvm::VPRecipeBase::getParent().
Referenced by llvm::VPPhi::execute(), incoming_blocks(), and printPhiOperands().
Returns the incoming VPValue with index Idx
.
Definition at line 1254 of file VPlan.h.
References getAsRecipe(), and llvm::VPUser::getOperand().
Referenced by llvm::VPPhi::execute().
|
inlinevirtual |
Returns the number of incoming values, also number of incoming blocks.
Reimplemented in llvm::VPReductionPHIRecipe, llvm::VPWidenInductionRecipe, and llvm::VPWidenIntOrFpInductionRecipe.
Definition at line 1262 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 1276 of file VPlan.h.
References getIncomingBlock(), getNumIncoming(), and llvm::map_range().
Referenced by incoming_values_and_blocks().
|
inline |
Returns an interator range over the incoming values.
Definition at line 1267 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 1287 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 1553 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 1544 of file VPlanRecipes.cpp.
References assert(), and getAsRecipe().