LLVM API Documentation
#include "llvm/Transforms/Utils/PromoteMemToReg.h"#include "llvm/Constants.h"#include "llvm/DerivedTypes.h"#include "llvm/Function.h"#include "llvm/Instructions.h"#include "llvm/IntrinsicInst.h"#include "llvm/Analysis/Dominators.h"#include "llvm/Analysis/AliasSetTracker.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/ADT/StringExtras.h"#include "llvm/ADT/STLExtras.h"#include "llvm/Support/CFG.h"#include "llvm/Support/Compiler.h"#include <algorithm>

Go to the source code of this file.
Namespaces | |
| namespace | llvm |
Classes | |
| struct | llvm::DenseMapInfo< std::pair< BasicBlock *, unsigned > > |
| struct | StoreIndexSearchPredicate |
Defines | |
| #define | DEBUG_TYPE "mem2reg" |
Functions | |
| STATISTIC (NumLocalPromoted,"Number of alloca's promoted within one block") | |
| STATISTIC (NumSingleStore,"Number of alloca's promoted with a single store") | |
| STATISTIC (NumDeadAlloca,"Number of dead alloca's removed") | |
| STATISTIC (NumPHIInsert,"Number of PHI nodes inserted") | |
| bool | llvm::isAllocaPromotable (const AllocaInst *AI) |
| void | llvm::PromoteMemToReg (const std::vector< AllocaInst * > &Allocas, DominatorTree &DT, DominanceFrontier &DF, AliasSetTracker *AST=0) |
| #define DEBUG_TYPE "mem2reg" |
Definition at line 19 of file PromoteMemoryToRegister.cpp.
| STATISTIC | ( | NumPHIInsert | , | |
| "Number of PHI nodes inserted" | ||||
| ) |
| STATISTIC | ( | NumDeadAlloca | , | |
| "Number of dead alloca's removed" | ||||
| ) |
| STATISTIC | ( | NumSingleStore | , | |
| "Number of alloca's promoted with a single store" | ||||
| ) |
| STATISTIC | ( | NumLocalPromoted | , | |
| "Number of alloca's promoted within one block" | ||||
| ) |
| std::map<AllocaInst*, unsigned> AllocaLookup |
AllocaLookup - Reverse mapping of Allocas.
Definition at line 181 of file PromoteMemoryToRegister.cpp.
Definition at line 269 of file PromoteMemoryToRegister.cpp.
| std::vector<AllocaInst*> Allocas |
Allocas - The alloca instructions being promoted.
Definition at line 171 of file PromoteMemoryToRegister.cpp.
AST - An AliasSetTracker object to update. If null, don't update it.
Definition at line 177 of file PromoteMemoryToRegister.cpp.
Definition at line 105 of file PromoteMemoryToRegister.cpp.
BBNumbers - Contains a stable numbering of basic blocks to avoid non-determinstic behavior.
Definition at line 203 of file PromoteMemoryToRegister.cpp.
| DenseMap<const BasicBlock*, unsigned> BBNumPreds |
BBNumPreds - Lazily compute the number of predecessors a block has.
Definition at line 206 of file PromoteMemoryToRegister.cpp.
| std::vector<BasicBlock*> DefiningBlocks |
Definition at line 262 of file PromoteMemoryToRegister.cpp.
Definition at line 173 of file PromoteMemoryToRegister.cpp.
Definition at line 172 of file PromoteMemoryToRegister.cpp.
| DenseMap<const Instruction *, unsigned> InstNumbers |
InstNumbers - For each instruction that we track, keep the index of the instruction. The index starts out as the number of the instruction from the start of the block.
Definition at line 125 of file PromoteMemoryToRegister.cpp.
| DenseMap<std::pair<BasicBlock*, unsigned>, PHINode*> NewPhiNodes |
NewPhiNodes - The PhiNodes we're adding.
Definition at line 185 of file PromoteMemoryToRegister.cpp.
Definition at line 266 of file PromoteMemoryToRegister.cpp.
Definition at line 265 of file PromoteMemoryToRegister.cpp.
| bool OnlyUsedInOneBlock |
Definition at line 267 of file PromoteMemoryToRegister.cpp.
PhiToAllocaMap - For each PHI node, keep track of which entry in Allocas it corresponds to.
Definition at line 189 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 195 of file PromoteMemoryToRegister.cpp.
Definition at line 106 of file PromoteMemoryToRegister.cpp.
Referenced by BBIsJumpedOver(), llvm::CloneAndPruneFunctionInto(), llvm::ARMInstrInfo::convertToThreeAddress(), llvm::ARMRegisterInfo::eliminateCallFramePseudoInstr(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::ARMInstrInfo::foldMemoryOperandImpl(), FoldTwoEntryPHINode(), FoldValueComparisonIntoPredecessors(), getOptionPred(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), and llvm::SimplifyCFG().
| std::vector<BasicBlock*> UsingBlocks |
Definition at line 263 of file PromoteMemoryToRegister.cpp.
| ValVector Values |
Definition at line 107 of file PromoteMemoryToRegister.cpp.
| SmallPtrSet<BasicBlock*, 16> Visited |
Visited - The set of basic blocks the renamer has already visited.
Definition at line 199 of file PromoteMemoryToRegister.cpp.
Referenced by llvm::Compress(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(), isNonImmUse(), llvm::SDNode::isPredecessorOf(), isTrivialLoopExitBlock(), llvm::GlobalAlias::resolveAliasedGlobal(), and llvm::LiveVariables::runOnMachineFunction().
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.