LLVM  6.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
llvm::VPRegionBlock Class Reference

VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-Single-Exit subgraph of the output IR CFG. More...

#include "Transforms/Vectorize/VPlan.h"

Inheritance diagram for llvm::VPRegionBlock:
Inheritance graph
[legend]
Collaboration diagram for llvm::VPRegionBlock:
Collaboration graph
[legend]

Public Member Functions

 VPRegionBlock (VPBlockBase *Entry, VPBlockBase *Exit, const std::string &Name="", bool IsReplicator=false)
 
 ~VPRegionBlock () override
 
const VPBlockBasegetEntry () const
 
VPBlockBasegetEntry ()
 
const VPBlockBasegetExit () const
 
VPBlockBasegetExit ()
 
bool isReplicator () const
 An indicator whether this region is to generate multiple replicated instances of output IR corresponding to its VPBlockBases. More...
 
void execute (struct VPTransformState *State) override
 The method which generates the output IR instructions that correspond to this VPRegionBlock, thereby "executing" the VPlan. More...
 
- Public Member Functions inherited from llvm::VPBlockBase
virtual ~VPBlockBase ()=default
 
const std::string & getName () const
 
void setName (const Twine &newName)
 
unsigned getVPBlockID () const
 
const VPRegionBlockgetParent () const
 
void setParent (VPRegionBlock *P)
 
const VPBasicBlockgetEntryBasicBlock () const
 
VPBasicBlockgetEntryBasicBlock ()
 
const VPBasicBlockgetExitBasicBlock () const
 
VPBasicBlockgetExitBasicBlock ()
 
const VPBlocksTygetSuccessors () const
 
VPBlocksTygetSuccessors ()
 
const VPBlocksTygetPredecessors () const
 
VPBlocksTygetPredecessors ()
 
VPBlockBasegetSingleSuccessor () const
 
VPBlockBasegetSinglePredecessor () const
 
VPBlockBasegetEnclosingBlockWithSuccessors ()
 An Enclosing Block of a block B is any block containing B, including B itself. More...
 
VPBlockBasegetEnclosingBlockWithPredecessors ()
 
const VPBlocksTygetHierarchicalSuccessors ()
 
VPBlockBasegetSingleHierarchicalSuccessor ()
 
const VPBlocksTygetHierarchicalPredecessors ()
 
VPBlockBasegetSingleHierarchicalPredecessor ()
 
VPBlockBasesetOneSuccessor (VPBlockBase *Successor)
 Sets a given VPBlockBase Successor as the single successor and. More...
 
void setTwoSuccessors (VPBlockBase *IfTrue, VPBlockBase *IfFalse)
 Sets two given VPBlockBases IfTrue and IfFalse to be the two successors. More...
 
void disconnectSuccessor (VPBlockBase *Successor)
 

Static Public Member Functions

static bool classof (const VPBlockBase *V)
 Method to support type inquiry through isa, cast, and dyn_cast. More...
 
- Static Public Member Functions inherited from llvm::VPBlockBase
static void deleteCFG (VPBlockBase *Entry)
 Delete all blocks reachable from a given VPBlockBase, inclusive. More...
 

Additional Inherited Members

- Public Types inherited from llvm::VPBlockBase
using VPBlockTy = enum { VPBasicBlockSC, VPRegionBlockSC }
 An enumeration for keeping track of the concrete subclass of VPBlockBase that are actually instantiated. More...
 
using VPBlocksTy = SmallVectorImpl< VPBlockBase * >
 
- Protected Member Functions inherited from llvm::VPBlockBase
 VPBlockBase (const unsigned char SC, const std::string &N)
 

Detailed Description

VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-Single-Exit subgraph of the output IR CFG.

A VPRegionBlock may indicate that its contents are to be replicated several times. This is designed to support predicated scalarization, in which a scalar if-then code structure needs to be generated VF * UF times. Having this replication indicator helps to keep a single model for multiple candidate VF's. The actual replication takes place only once the desired VF and UF have been determined.

Definition at line 569 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPRegionBlock()

llvm::VPRegionBlock::VPRegionBlock ( VPBlockBase Entry,
VPBlockBase Exit,
const std::string &  Name = "",
bool  IsReplicator = false 
)
inline

◆ ~VPRegionBlock()

llvm::VPRegionBlock::~VPRegionBlock ( )
inlineoverride

Definition at line 592 of file VPlan.h.

Member Function Documentation

◆ classof()

static bool llvm::VPRegionBlock::classof ( const VPBlockBase V)
inlinestatic

Method to support type inquiry through isa, cast, and dyn_cast.

Definition at line 598 of file VPlan.h.

References llvm::VPBlockBase::getVPBlockID().

◆ execute()

void VPRegionBlock::execute ( struct VPTransformState State)
overridevirtual

The method which generates the output IR instructions that correspond to this VPRegionBlock, thereby "executing" the VPlan.

Implements llvm::VPBlockBase.

Definition at line 182 of file VPlan.cpp.

References assert(), llvm::dbgs(), DEBUG, llvm::VPTransformState::Instance, llvm::VPTransformState::UF, and llvm::VPTransformState::VF.

◆ getEntry() [1/2]

const VPBlockBase* llvm::VPRegionBlock::getEntry ( ) const
inline

◆ getEntry() [2/2]

VPBlockBase* llvm::VPRegionBlock::getEntry ( )
inline

Definition at line 603 of file VPlan.h.

◆ getExit() [1/2]

const VPBlockBase* llvm::VPRegionBlock::getExit ( ) const
inline

Definition at line 605 of file VPlan.h.

Referenced by llvm::VPBlockBase::getEnclosingBlockWithSuccessors().

◆ getExit() [2/2]

VPBlockBase* llvm::VPRegionBlock::getExit ( )
inline

Definition at line 606 of file VPlan.h.

◆ isReplicator()

bool llvm::VPRegionBlock::isReplicator ( ) const
inline

An indicator whether this region is to generate multiple replicated instances of output IR corresponding to its VPBlockBases.

Definition at line 610 of file VPlan.h.

Referenced by llvm::VPlan::execute().


The documentation for this class was generated from the following files: