LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::VPBlockUtils Class Reference

Class that provides utilities for VPBlockBases in VPlan. More...

#include "Transforms/Vectorize/VPlan.h"

Public Member Functions

 VPBlockUtils ()=delete
 

Static Public Member Functions

static void insertBlockAfter (VPBlockBase *NewBlock, VPBlockBase *BlockPtr)
 Insert disconnected VPBlockBase NewBlock after BlockPtr.
 
static void insertTwoBlocksAfter (VPBlockBase *IfTrue, VPBlockBase *IfFalse, VPBlockBase *BlockPtr)
 Insert disconnected VPBlockBases IfTrue and IfFalse after BlockPtr.
 
static void connectBlocks (VPBlockBase *From, VPBlockBase *To)
 Connect VPBlockBases From and To bi-directionally.
 
static void disconnectBlocks (VPBlockBase *From, VPBlockBase *To)
 Disconnect VPBlockBases From and To bi-directionally.
 
template<typename BlockTy , typename T >
static auto blocksOnly (const T &Range)
 Return an iterator range over Range which only includes BlockTy blocks.
 

Detailed Description

Class that provides utilities for VPBlockBases in VPlan.

Definition at line 3585 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPBlockUtils()

llvm::VPBlockUtils::VPBlockUtils ( )
delete

Member Function Documentation

◆ blocksOnly()

template<typename BlockTy , typename T >
static auto llvm::VPBlockUtils::blocksOnly ( const T Range)
inlinestatic

Return an iterator range over Range which only includes BlockTy blocks.

The accesses are casted to BlockTy.

Definition at line 3650 of file VPlan.h.

References llvm::Block, llvm::Filter, llvm::make_filter_range(), llvm::map_range(), and Range.

◆ connectBlocks()

static void llvm::VPBlockUtils::connectBlocks ( VPBlockBase From,
VPBlockBase To 
)
inlinestatic

Connect VPBlockBases From and To bi-directionally.

Append To to the successors of From and From to the predecessors of To. Both VPBlockBases must have the same parent, which can be null. Both VPBlockBases can be already connected to other VPBlockBases.

Definition at line 3630 of file VPlan.h.

References assert(), From, and llvm::VPBlockBase::getParent().

Referenced by addReplicateRegions(), llvm::VPlan::createInitialVPlan(), createReplicateRegion(), insertBlockAfter(), mergeBlocksIntoPredecessors(), mergeReplicateRegionsIntoSuccessors(), replaceVPBBWithIRVPBB(), and llvm::VPBasicBlock::splitAt().

◆ disconnectBlocks()

static void llvm::VPBlockUtils::disconnectBlocks ( VPBlockBase From,
VPBlockBase To 
)
inlinestatic

Disconnect VPBlockBases From and To bi-directionally.

Remove To from the successors of From and From from the predecessors of To.

Definition at line 3641 of file VPlan.h.

References assert(), and From.

Referenced by addReplicateRegions(), insertBlockAfter(), mergeBlocksIntoPredecessors(), mergeReplicateRegionsIntoSuccessors(), replaceVPBBWithIRVPBB(), and llvm::VPBasicBlock::splitAt().

◆ insertBlockAfter()

static void llvm::VPBlockUtils::insertBlockAfter ( VPBlockBase NewBlock,
VPBlockBase BlockPtr 
)
inlinestatic

Insert disconnected VPBlockBase NewBlock after BlockPtr.

Add NewBlock as successor of BlockPtr and BlockPtr as predecessor of NewBlock, and propagate BlockPtr parent to NewBlock. BlockPtr's successors are moved from BlockPtr to NewBlock. NewBlock must have neither successors nor predecessors.

Definition at line 3594 of file VPlan.h.

References assert(), connectBlocks(), disconnectBlocks(), llvm::SmallVectorBase< Size_T >::empty(), llvm::VPBlockBase::getParent(), llvm::VPBlockBase::getPredecessors(), llvm::VPBlockBase::getSuccessors(), llvm::VPBlockBase::setParent(), and llvm::VPBlockBase::successors().

Referenced by llvm::VPlan::createInitialVPlan(), and llvm::VPBasicBlock::splitAt().

◆ insertTwoBlocksAfter()

static void llvm::VPBlockUtils::insertTwoBlocksAfter ( VPBlockBase IfTrue,
VPBlockBase IfFalse,
VPBlockBase BlockPtr 
)
inlinestatic

Insert disconnected VPBlockBases IfTrue and IfFalse after BlockPtr.

Add IfTrue and IfFalse as succesors of BlockPtr and BlockPtr as predecessor of IfTrue and IfFalse. Propagate BlockPtr parent to IfTrue and IfFalse. BlockPtr must have no successors and IfTrue and IfFalse must have neither successors nor predecessors.

Definition at line 3613 of file VPlan.h.

References assert(), llvm::SmallVectorBase< Size_T >::empty(), llvm::VPBlockBase::getParent(), llvm::VPBlockBase::getSuccessors(), llvm::VPBlockBase::setParent(), llvm::VPBlockBase::setPredecessors(), and llvm::VPBlockBase::setTwoSuccessors().

Referenced by createReplicateRegion().


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