LLVM 22.0.0git
SSAUpdaterBulk.cpp File Reference

Go to the source code of this file.

Classes

struct  BBValueInfo

Macros

#define DEBUG_TYPE   "ssaupdaterbulk"

Functions

static BasicBlockgetUserBB (Use *U)
 Helper function for finding a block which should have a value for the given user.
static void ComputeLiveInBlocks (const SmallPtrSetImpl< BasicBlock * > &UsingBlocks, const SmallPtrSetImpl< BasicBlock * > &DefBlocks, SmallPtrSetImpl< BasicBlock * > &LiveInBlocks, PredIteratorCache &PredCache)
 Given sets of UsingBlocks and DefBlocks, compute the set of LiveInBlocks.
static void simplifyPass (MutableArrayRef< PHINode * > Worklist, const DataLayout &DL)
static bool PHIAreRefEachOther (const iterator_range< BasicBlock::phi_iterator > NewPHIs)
static bool replaceIfIdentical (PHINode &PHI, PHINode &ReplPHI)
bool EliminateNewDuplicatePHINodes (BasicBlock *BB, BasicBlock::phi_iterator FirstExistingPN)
static void deduplicatePass (ArrayRef< PHINode * > Worklist)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "ssaupdaterbulk"

Definition at line 24 of file SSAUpdaterBulk.cpp.

Function Documentation

◆ ComputeLiveInBlocks()

void ComputeLiveInBlocks ( const SmallPtrSetImpl< BasicBlock * > & UsingBlocks,
const SmallPtrSetImpl< BasicBlock * > & DefBlocks,
SmallPtrSetImpl< BasicBlock * > & LiveInBlocks,
PredIteratorCache & PredCache )
static

◆ deduplicatePass()

void deduplicatePass ( ArrayRef< PHINode * > Worklist)
static

◆ EliminateNewDuplicatePHINodes()

bool EliminateNewDuplicatePHINodes ( BasicBlock * BB,
BasicBlock::phi_iterator FirstExistingPN )

◆ getUserBB()

BasicBlock * getUserBB ( Use * U)
static

Helper function for finding a block which should have a value for the given user.

For PHI-nodes this block is the corresponding predecessor, for other instructions it's their parent block.

Definition at line 29 of file SSAUpdaterBulk.cpp.

References llvm::cast(), and llvm::dyn_cast().

Referenced by llvm::SSAUpdaterBulk::AddUse(), and llvm::SSAUpdaterBulk::RewriteAllUses().

◆ PHIAreRefEachOther()

◆ replaceIfIdentical()

bool replaceIfIdentical ( PHINode & PHI,
PHINode & ReplPHI )
static

Definition at line 262 of file SSAUpdaterBulk.cpp.

References PHI.

Referenced by EliminateNewDuplicatePHINodes().

◆ simplifyPass()

void simplifyPass ( MutableArrayRef< PHINode * > Worklist,
const DataLayout & DL )
static

Definition at line 231 of file SSAUpdaterBulk.cpp.

References DL, PHI, and llvm::simplifyInstruction().

Referenced by llvm::SSAUpdaterBulk::RewriteAndOptimizeAllUses().