Go to the documentation of this file.
24 auto *TopRegion = cast<VPRegionBlock>(Plan->getEntry());
29 if (Base->getNumPredecessors() == 0 || Base->getNumSuccessors() == 0)
38 if (DeadInstructions.
count(Inst)) {
46 if (
auto *VPPhi = dyn_cast<VPWidenPHIRecipe>(Ingredient)) {
47 auto *Phi = cast<PHINode>(VPPhi->getUnderlyingValue());
54 Plan->addVPValue(Phi, VPPhi);
58 assert(isa<VPInstruction>(Ingredient) &&
59 "only VPInstructions expected here");
60 assert(!isa<PHINode>(Inst) &&
"phis should be handled above");
69 Plan->getOrAddVPValue(
Store->getValueOperand()),
73 GEP, Plan->mapToVPValues(
GEP->operands()), OrigLoop);
74 }
else if (
CallInst *CI = dyn_cast<CallInst>(Inst)) {
76 *CI, Plan->mapToVPValues(CI->arg_operands()));
77 }
else if (
SelectInst *
SI = dyn_cast<SelectInst>(Inst)) {
81 *
SI, Plan->mapToVPValues(
SI->operands()), InvariantCond);
93 "Only recpies with zero or one defined values expected");
95 Plan->removeVPValueFor(Inst);
97 Plan->addVPValue(Inst,
Def);
iplist< VPRecipeBase >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph.
Represents a single loop in the control flow graph.
The main scalar evolution driver.
@ IK_IntInduction
Integer induction variable. Step = C.
std::unique_ptr< VPlan > VPlanPtr
A recipe for widening Call instructions.
InductionKind getKind() const
VPBlockBase is the building block of the Hierarchical Control-Flow Graph.
A struct for saving information about induction variables.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void replaceAllUsesWith(VPValue *New)
unsigned getNumDefinedValues() const
Returns the number of values defined by the VPDef.
const SCEV * getSCEV(Value *V)
Return a SCEV expression for the full generality of the specified expression.
Value * getStartValue() const
An instruction for storing to memory.
VPWidenRecipe is a recipe for producing a copy of vector type its ingredient.
an instruction for type-safe pointer arithmetic to access elements of arrays and structs
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A recipe for handling phi nodes of integer and floating-point inductions, producing their vector and ...
A recipe for handling GEP instructions.
@ IK_FpInduction
Floating point induction variable.
This class represents the LLVM 'select' instruction.
A Recipe for widening load/store operations.
A recipe for widening select instructions.
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
ValueT lookup(const KeyT &Key) const
An instruction for reading from memory.
const VPBasicBlock * getEntryBasicBlock() const
bool isLoopInvariant(const SCEV *S, const Loop *L)
Return true if the value of the given SCEV is unchanging in the specified loop.
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.
iterator begin()
Recipe iterator methods.
ArrayRef< VPValue * > definedValues()
Returns an ArrayRef of the values defined by the VPDef.
const Value * getLoadStorePointerOperand(const Value *V)
A helper function that returns the pointer operand of a load or store instruction.
This class represents a function call, abstracting a target machine's calling convention.
VPValue * getVPValue(unsigned I=0)
Returns the VPValue with index I defined by the VPDef.
Value * getUnderlyingValue()
Return the underlying Value attached to this VPValue.
void insertBefore(VPRecipeBase *InsertPos)
Insert an unlinked recipe into a basic block immediately before the specified recipe.