LLVM API Documentation

PromoteMemoryToRegister.cpp File Reference

#include "llvm/Transforms/Utils/PromoteMemToReg.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/AliasSetTracker.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/StableBasicBlockNumbering.h"
#include <algorithm>

Include dependency graph for PromoteMemoryToRegister.cpp:

Go to the source code of this file.

Functions

bool llvm::isAllocaPromotable (const AllocaInst *AI, const TargetData &TD)
void llvm::PromoteMemToReg (const std::vector< AllocaInst * > &Allocas, DominatorTree &DT, DominanceFrontier &DF, const TargetData &TD, AliasSetTracker *AST)

Variables

std::vector< AllocaInst * > Allocas
std::vector< AllocaInst * > & RetryList
DominatorTreeDT
DominanceFrontierDF
const TargetDataTD
AliasSetTrackerAST
std::map< AllocaInst *, unsigned > AllocaLookup
std::map< BasicBlock *, std::vector<
PHINode * > > 
NewPhiNodes
std::vector< Value * > PointerAllocaValues
std::set< BasicBlock * > Visited
StableBasicBlockNumbering BBNumbers


Variable Documentation

std::map<AllocaInst*, unsigned> AllocaLookup

AllocaLookup - Reverse mapping of Allocas.

Definition at line 70 of file PromoteMemoryToRegister.cpp.

std::vector<AllocaInst*> Allocas

Allocas - The alloca instructions being promoted.

Definition at line 58 of file PromoteMemoryToRegister.cpp.

AliasSetTracker* AST

AST - An AliasSetTracker object to update. If null, don't update it.

Definition at line 66 of file PromoteMemoryToRegister.cpp.

Referenced by llvm::AliasSetTracker::add(), llvm::AliasSet::mergeSetIn(), llvm::operator<<(), and llvm::PromoteMemToReg().

StableBasicBlockNumbering BBNumbers

BBNumbers - Contains a stable numbering of basic blocks to avoid non-determinstic behavior.

Definition at line 88 of file PromoteMemoryToRegister.cpp.

DominanceFrontier& DF

Definition at line 61 of file PromoteMemoryToRegister.cpp.

DominatorTree& DT

Definition at line 60 of file PromoteMemoryToRegister.cpp.

std::map<BasicBlock*, std::vector<PHINode*> > NewPhiNodes

NewPhiNodes - The PhiNodes we're adding.

Definition at line 74 of file PromoteMemoryToRegister.cpp.

std::vector<Value*> PointerAllocaValues

PointerAllocaValues - If we are updating an AliasSetTracker, then for each alloca that is of pointer type, we keep track of what to copyValue to the inserted PHI nodes here.

Definition at line 80 of file PromoteMemoryToRegister.cpp.

std::vector<AllocaInst*>& RetryList

Definition at line 59 of file PromoteMemoryToRegister.cpp.

Referenced by llvm::PromoteMemToReg().

const TargetData& TD

Definition at line 62 of file PromoteMemoryToRegister.cpp.

std::set<BasicBlock*> Visited

Visited - The set of basic blocks the renamer has already visited.

Definition at line 84 of file PromoteMemoryToRegister.cpp.

Referenced by isTrivialLoopExitBlock(), llvm::DSGraph::removeDeadNodes(), and llvm::LiveVariables::runOnMachineFunction().