LLVM  8.0.1
Macros | Functions
SSAUpdaterBulk.cpp File Reference
#include "llvm/Transforms/Utils/SSAUpdaterBulk.h"
#include "llvm/Analysis/IteratedDominanceFrontier.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/Value.h"
Include dependency graph for SSAUpdaterBulk.cpp:

Go to the source code of this file.

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. More...
 
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. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "ssaupdaterbulk"

Definition at line 25 of file SSAUpdaterBulk.cpp.

Function Documentation

◆ ComputeLiveInBlocks()

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

Given sets of UsingBlocks and DefBlocks, compute the set of LiveInBlocks.

This is basically a subgraph limited by DefBlocks and UsingBlocks.

Definition at line 93 of file SSAUpdaterBulk.cpp.

References llvm::SmallPtrSetImpl< PtrType >::begin(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::SmallPtrSetImpl< PtrType >::end(), llvm::PredIteratorCache::get(), llvm::SmallPtrSetImpl< PtrType >::insert(), and P.

Referenced by llvm::isAllocaPromotable(), promoteSingleBlockAlloca(), and llvm::SSAUpdaterBulk::RewriteAllUses().

◆ getUserBB()

static 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 30 of file SSAUpdaterBulk.cpp.

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