class VPBlockBase
Declaration
class VPBlockBase { /* full declaration omitted */ };
Description
VPBlockBase is the building block of the Hierarchical Control-Flow Graph. A VPBlockBase can be either a VPBasicBlock or a VPRegionBlock.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:385
Member Variables
- private const unsigned char SubclassID
- Subclass identifier (for isa/dyn_cast).
- private std::string Name
- An optional name for the block.
- private llvm::VPRegionBlock* Parent = nullptr
- The immediate VPRegionBlock which this VPBlockBase belongs to, or null if it is a topmost VPBlockBase.
- private SmallVector<llvm::VPBlockBase*, 1> Predecessors
- List of predecessor blocks.
- private SmallVector<llvm::VPBlockBase*, 1> Successors
- List of successor blocks.
- private llvm::VPlan* Plan = nullptr
- VPlan containing the block. Can only be set on the entry block of the plan.
Method Overview
- protected VPBlockBase(const unsigned char SC, const std::string & N)
- private void appendPredecessor(llvm::VPBlockBase * Predecessor)
- private void appendSuccessor(llvm::VPBlockBase * Successor)
- public void clearPredecessors()
- public void clearSuccessors()
- public static void deleteCFG(llvm::VPBlockBase * Entry)
- public virtual void dropAllReferences(llvm::VPValue * NewValue)
- public void dump() const
- public virtual void execute(struct VPTransformState * State)
- public llvm::VPBlockBase * getEnclosingBlockWithPredecessors()
- public llvm::VPBlockBase * getEnclosingBlockWithSuccessors()
- public const llvm::VPBasicBlock * getEntryBasicBlock() const
- public llvm::VPBasicBlock * getEntryBasicBlock()
- public const llvm::VPBasicBlock * getExitingBasicBlock() const
- public llvm::VPBasicBlock * getExitingBasicBlock()
- public const llvm::VPBlockBase::VPBlocksTy & getHierarchicalPredecessors()
- public const llvm::VPBlockBase::VPBlocksTy & getHierarchicalSuccessors()
- public const std::string & getName() const
- public size_t getNumPredecessors() const
- public size_t getNumSuccessors() const
- public llvm::VPRegionBlock * getParent()
- public const llvm::VPRegionBlock * getParent() const
- public const llvm::VPlan * getPlan() const
- public llvm::VPlan * getPlan()
- public llvm::VPBlockBase::VPBlocksTy & getPredecessors()
- public const llvm::VPBlockBase::VPBlocksTy & getPredecessors() const
- public llvm::VPBlockBase * getSingleHierarchicalPredecessor()
- public llvm::VPBlockBase * getSingleHierarchicalSuccessor()
- public llvm::VPBlockBase * getSinglePredecessor() const
- public llvm::VPBlockBase * getSingleSuccessor() const
- public llvm::VPBlockBase::VPBlocksTy & getSuccessors()
- public const llvm::VPBlockBase::VPBlocksTy & getSuccessors() const
- public unsigned int getVPBlockID() const
- public bool isLegalToHoistInto()
- public void print(llvm::raw_ostream & O) const
- public virtual void print(llvm::raw_ostream & O, const llvm::Twine & Indent, llvm::VPSlotTracker & SlotTracker) const
- public void printAsOperand(llvm::raw_ostream & OS, bool PrintType) const
- public void printSuccessors(llvm::raw_ostream & O, const llvm::Twine & Indent) const
- private void removePredecessor(llvm::VPBlockBase * Predecessor)
- private void removeSuccessor(llvm::VPBlockBase * Successor)
- public void setName(const llvm::Twine & newName)
- public void setOneSuccessor(llvm::VPBlockBase * Successor)
- public void setParent(llvm::VPRegionBlock * P)
- public void setPlan(llvm::VPlan * ParentPlan)
- public void setPredecessors(ArrayRef<llvm::VPBlockBase *> NewPreds)
- public void setTwoSuccessors(llvm::VPBlockBase * IfTrue, llvm::VPBlockBase * IfFalse)
- public iterator_range<llvm::VPBlockBase **> successors()
- public virtual ~VPBlockBase()
Methods
¶VPBlockBase(const unsigned char SC,
const std::string& N)
VPBlockBase(const unsigned char SC,
const std::string& N)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:434
Parameters
- const unsigned char SC
- const std::string& N
¶void appendPredecessor(
llvm::VPBlockBase* Predecessor)
void appendPredecessor(
llvm::VPBlockBase* Predecessor)
Description
Add \p Predecessor as the last predecessor to this block.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:414
Parameters
- llvm::VPBlockBase* Predecessor
¶void appendSuccessor(llvm::VPBlockBase* Successor)
void appendSuccessor(llvm::VPBlockBase* Successor)
Description
Add \p Successor as the last successor to this block.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:408
Parameters
- llvm::VPBlockBase* Successor
¶void clearPredecessors()
void clearPredecessors()
Description
Remove all the predecessor of this block.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:576
¶void clearSuccessors()
void clearSuccessors()
Description
Remove all the successors of this block.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:579
¶static void deleteCFG(llvm::VPBlockBase* Entry)
static void deleteCFG(llvm::VPBlockBase* Entry)
Description
Delete all blocks reachable from a given VPBlockBase, inclusive.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:586
Parameters
- llvm::VPBlockBase* Entry
¶virtual void dropAllReferences(
llvm::VPValue* NewValue)
virtual void dropAllReferences(
llvm::VPValue* NewValue)
Description
Replace all operands of VPUsers in the block with \p NewValue and also replaces all uses of VPValues defined in the block with NewValue.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:597
Parameters
- llvm::VPValue* NewValue
¶void dump() const
void dump() const
Description
Dump this VPBlockBase to dbgs().
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:624
¶virtual void execute(
struct VPTransformState* State)
virtual void execute(
struct VPTransformState* State)
Description
The method which generates the output IR that correspond to this VPBlockBase, thereby "executing" the VPlan.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:583
Parameters
- struct VPTransformState* State
¶llvm::VPBlockBase*
getEnclosingBlockWithPredecessors()
llvm::VPBlockBase*
getEnclosingBlockWithPredecessors()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:514
Returns
the root enclosing block if all enclosing blocks have no predecessors.
¶llvm::VPBlockBase*
getEnclosingBlockWithSuccessors()
llvm::VPBlockBase*
getEnclosingBlockWithSuccessors()
Description
An Enclosing Block of a block B is any block containing B, including B itself.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:509
Returns
the root enclosing block if all enclosing blocks have no successors.
¶const llvm::VPBasicBlock* getEntryBasicBlock()
const
const llvm::VPBasicBlock* getEntryBasicBlock()
const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:473
Returns
the VPBasicBlock that is the entry of this VPBlockBase, recursively, if the latter is a VPRegionBlock. Otherwise, if this VPBlockBase is a VPBasicBlock, it is returned.
¶llvm::VPBasicBlock* getEntryBasicBlock()
llvm::VPBasicBlock* getEntryBasicBlock()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:474
¶const llvm::VPBasicBlock* getExitingBasicBlock()
const
const llvm::VPBasicBlock* getExitingBasicBlock()
const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:479
Returns
the VPBasicBlock that is the exiting this VPBlockBase, recursively, if the latter is a VPRegionBlock. Otherwise, if this VPBlockBase is a VPBasicBlock, it is returned.
¶llvm::VPBasicBlock* getExitingBasicBlock()
llvm::VPBasicBlock* getExitingBasicBlock()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:480
¶const llvm::VPBlockBase::VPBlocksTy&
getHierarchicalPredecessors()
const llvm::VPBlockBase::VPBlocksTy&
getHierarchicalPredecessors()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:538
Returns
the predecessors either attached directly to this VPBlockBase or, if this VPBlockBase is the entry block of a VPRegionBlock and has no predecessors of its own, search recursively for the first enclosing VPRegionBlock that has predecessors and return them. If no such VPRegionBlock exists, return the (empty) predecessors of the topmost VPBlockBase reached.
¶const llvm::VPBlockBase::VPBlocksTy&
getHierarchicalSuccessors()
const llvm::VPBlockBase::VPBlocksTy&
getHierarchicalSuccessors()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:522
Returns
the successors either attached directly to this VPBlockBase or, if this VPBlockBase is the exit block of a VPRegionBlock and has no successors of its own, search recursively for the first enclosing VPRegionBlock that has successors and return them. If no such VPRegionBlock exists, return the (empty) successors of the topmost VPBlockBase reached.
¶const std::string& getName() const
const std::string& getName() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:448
¶size_t getNumPredecessors() const
size_t getNumPredecessors() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:503
¶size_t getNumSuccessors() const
size_t getNumSuccessors() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:502
¶llvm::VPRegionBlock* getParent()
llvm::VPRegionBlock* getParent()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:457
¶const llvm::VPRegionBlock* getParent() const
const llvm::VPRegionBlock* getParent() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:458
¶const llvm::VPlan* getPlan() const
const llvm::VPlan* getPlan() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:462
¶llvm::VPlan* getPlan()
llvm::VPlan* getPlan()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:461
Returns
A pointer to the plan containing the current block.
¶llvm::VPBlockBase::VPBlocksTy& getPredecessors()
llvm::VPBlockBase::VPBlocksTy& getPredecessors()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:488
¶const llvm::VPBlockBase::VPBlocksTy&
getPredecessors() const
const llvm::VPBlockBase::VPBlocksTy&
getPredecessors() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:487
¶llvm::VPBlockBase*
getSingleHierarchicalPredecessor()
llvm::VPBlockBase*
getSingleHierarchicalPredecessor()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:544
Returns
the hierarchical predecessor of this VPBlockBase if it has a single hierarchical predecessor. Otherwise return a null pointer.
¶llvm::VPBlockBase*
getSingleHierarchicalSuccessor()
llvm::VPBlockBase*
getSingleHierarchicalSuccessor()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:528
Returns
the hierarchical successor of this VPBlockBase if it has a single hierarchical successor. Otherwise return a null pointer.
¶llvm::VPBlockBase* getSinglePredecessor() const
llvm::VPBlockBase* getSinglePredecessor() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:498
Returns
the predecessor of this VPBlockBase if it has a single predecessor. Otherwise return a null pointer.
¶llvm::VPBlockBase* getSingleSuccessor() const
llvm::VPBlockBase* getSingleSuccessor() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:492
Returns
the successor of this VPBlockBase if it has a single successor. Otherwise return a null pointer.
¶llvm::VPBlockBase::VPBlocksTy& getSuccessors()
llvm::VPBlockBase::VPBlocksTy& getSuccessors()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:483
¶const llvm::VPBlockBase::VPBlocksTy&
getSuccessors() const
const llvm::VPBlockBase::VPBlocksTy&
getSuccessors() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:482
¶unsigned int getVPBlockID() const
unsigned int getVPBlockID() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:455
Returns
an ID for the concrete type of this object. This is used to implement the classof checks. This should not be used for any other purpose, as the values may change as LLVM evolves.
¶bool isLegalToHoistInto()
bool isLegalToHoistInto()
Description
Return true if it is legal to hoist instructions into this block.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:589
¶void print(llvm::raw_ostream& O) const
void print(llvm::raw_ostream& O) const
Description
Print plain-text dump of this VPlan to \p O.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:614
Parameters
¶virtual void print(
llvm::raw_ostream& O,
const llvm::Twine& Indent,
llvm::VPSlotTracker& SlotTracker) const
virtual void print(
llvm::raw_ostream& O,
const llvm::Twine& Indent,
llvm::VPSlotTracker& SlotTracker) const
Description
Print plain-text dump of this VPBlockBase to \p O, prefixing all lines with \p Indent. \p SlotTracker is used to print unnamed VPValue's using consequtive numbers. Note that the numbering is applied to the whole VPlan, so printing individual blocks is consistent with the whole VPlan printing.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:610
Parameters
- llvm::raw_ostream& O
- const llvm::Twine& Indent
- llvm::VPSlotTracker& SlotTracker
¶void printAsOperand(llvm::raw_ostream& OS,
bool PrintType) const
void printAsOperand(llvm::raw_ostream& OS,
bool PrintType) const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:600
Parameters
- llvm::raw_ostream& OS
- bool PrintType
¶void printSuccessors(
llvm::raw_ostream& O,
const llvm::Twine& Indent) const
void printSuccessors(
llvm::raw_ostream& O,
const llvm::Twine& Indent) const
Description
Print the successors of this block to \p O, prefixing all lines with \p Indent.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:621
Parameters
- llvm::raw_ostream& O
- const llvm::Twine& Indent
¶void removePredecessor(
llvm::VPBlockBase* Predecessor)
void removePredecessor(
llvm::VPBlockBase* Predecessor)
Description
Remove \p Predecessor from the predecessors of this block.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:420
Parameters
- llvm::VPBlockBase* Predecessor
¶void removeSuccessor(llvm::VPBlockBase* Successor)
void removeSuccessor(llvm::VPBlockBase* Successor)
Description
Remove \p Successor from the successors of this block.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:427
Parameters
- llvm::VPBlockBase* Successor
¶void setName(const llvm::Twine& newName)
void setName(const llvm::Twine& newName)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:450
Parameters
- const llvm::Twine& newName
¶void setOneSuccessor(llvm::VPBlockBase* Successor)
void setOneSuccessor(llvm::VPBlockBase* Successor)
Description
Set a given VPBlockBase \p Successor as the single successor of this VPBlockBase. This VPBlockBase is not added as predecessor of \p Successor. This VPBlockBase must have no successors.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:551
Parameters
- llvm::VPBlockBase* Successor
¶void setParent(llvm::VPRegionBlock* P)
void setParent(llvm::VPRegionBlock* P)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:468
Parameters
¶void setPlan(llvm::VPlan* ParentPlan)
void setPlan(llvm::VPlan* ParentPlan)
Description
Sets the pointer of the plan containing the block. The block must be the entry block into the VPlan.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:466
Parameters
- llvm::VPlan* ParentPlan
¶void setPredecessors(
ArrayRef<llvm::VPBlockBase*> NewPreds)
void setPredecessors(
ArrayRef<llvm::VPBlockBase*> NewPreds)
Description
Set each VPBasicBlock in \p NewPreds as predecessor of this VPBlockBase. This VPBlockBase must have no predecessors. This VPBlockBase is not added as successor of any VPBasicBlock in \p NewPreds.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:569
Parameters
- ArrayRef<llvm::VPBlockBase*> NewPreds
¶void setTwoSuccessors(llvm::VPBlockBase* IfTrue,
llvm::VPBlockBase* IfFalse)
void setTwoSuccessors(llvm::VPBlockBase* IfTrue,
llvm::VPBlockBase* IfFalse)
Description
Set two given VPBlockBases \p IfTrue and \p IfFalse to be the two successors of this VPBlockBase. This VPBlockBase is not added as predecessor of \p IfTrue or \p IfFalse. This VPBlockBase must have no successors.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:560
Parameters
- llvm::VPBlockBase* IfTrue
- llvm::VPBlockBase* IfFalse
¶iterator_range<llvm::VPBlockBase**> successors()
iterator_range<llvm::VPBlockBase**> successors()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:485
¶virtual ~VPBlockBase()
virtual ~VPBlockBase()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:446