LLVM API Documentation

Andersens.cpp File Reference

#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Support/InstVisitor.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Support/Debug.h"
#include "llvm/System/Atomic.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/SparseBitVector.h"
#include "llvm/ADT/DenseSet.h"
#include <algorithm>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <vector>
#include <queue>

Include dependency graph for Andersens.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "anders-aa"
#define FULL_UNIVERSAL   0
#define DEBUG_TYPE   "anders-aa-constraints"
#define DEBUG_TYPE   "anders-aa"
#define DEBUG_TYPE   "anders-aa-renumber"
#define DEBUG_TYPE   "anders-aa"
#define DEBUG_TYPE   "anders-aa-labels"
#define DEBUG_TYPE   "anders-aa"
#define DEBUG_TYPE   "anders-aa-labels"
#define DEBUG_TYPE   "anders-aa"
#define DEBUG_TYPE   "anders-aa-constraints"
#define DEBUG_TYPE   "anders-aa"

Functions

 STATISTIC (NumIters,"Number of iterations to reach convergence")
 STATISTIC (NumConstraints,"Number of constraints")
 STATISTIC (NumNodes,"Number of nodes")
 STATISTIC (NumUnified,"Number of variables unified")
 STATISTIC (NumErased,"Number of redundant constraints erased")
ModulePass * llvm::createAndersensPass ()

Variables

static const unsigned SelfRep = (unsigned)-1
static const unsigned Unvisited = (unsigned)-1
static const unsigned CallReturnPos = 1
static const unsigned CallFirstArgPos = 2
static RegisterPass< Andersens > X ("anders-aa","Andersen's Interprocedural Alias Analysis", false, true)
static RegisterAnalysisGroup
< AliasAnalysis > 
Y (X)


Define Documentation

#define DEBUG_TYPE   "anders-aa"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa-constraints"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa-labels"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa-labels"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa-renumber"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa-constraints"

Definition at line 56 of file Andersens.cpp.

#define DEBUG_TYPE   "anders-aa"

Definition at line 56 of file Andersens.cpp.

#define FULL_UNIVERSAL   0

Definition at line 85 of file Andersens.cpp.


Function Documentation

STATISTIC ( NumErased  ,
"Number of redundant constraints erased"   
)

STATISTIC ( NumUnified  ,
"Number of variables unified"   
)

STATISTIC ( NumNodes  ,
"Number of nodes"   
)

STATISTIC ( NumConstraints  ,
"Number of constraints"   
)

STATISTIC ( NumIters  ,
"Number of iterations to reach convergence"   
)


Variable Documentation

Definition at line 243 of file Andersens.cpp.

const unsigned CallFirstArgPos = 2 [static]

Definition at line 99 of file Andersens.cpp.

const unsigned CallReturnPos = 1 [static]

Definition at line 97 of file Andersens.cpp.

std::vector<Constraint> Constraints

Constraints - This vector contains a list of all of the constraints identified by the program.

Definition at line 222 of file Andersens.cpp.

Referenced by llvm::X86TargetLowering::ExpandInlineAsm(), llvm::TargetInstrDesc::getOperandConstraint(), and IsOperandAMemoryOperand().

volatile sys::cas_flag Counter [static]

Definition at line 215 of file Andersens.cpp.

Definition at line 398 of file Andersens.cpp.

Definition at line 394 of file Andersens.cpp.

Definition at line 238 of file Andersens.cpp.

Definition at line 219 of file Andersens.cpp.

Definition at line 414 of file Andersens.cpp.

Definition at line 411 of file Andersens.cpp.

std::vector<Node> GraphNodes

GraphNodes - This vector is populated as part of the object identification stage of the analysis, which populates this vector with a node for each memory object and fills in the ValueNodes map.

Definition at line 346 of file Andersens.cpp.

std::vector<unsigned> HCDSCCRep

Definition at line 428 of file Andersens.cpp.

char ID [static]

Definition at line 436 of file Andersens.cpp.

Definition at line 229 of file Andersens.cpp.

Definition at line 226 of file Andersens.cpp.

std::map<unsigned, unsigned> MaxK

Definition at line 373 of file Andersens.cpp.

Definition at line 398 of file Andersens.cpp.

Definition at line 299 of file Andersens.cpp.

std::vector<bool> Node2Deleted

Definition at line 388 of file Andersens.cpp.

std::vector<unsigned> Node2DFS

Definition at line 386 of file Andersens.cpp.

std::vector<bool> Node2Visited

Definition at line 407 of file Andersens.cpp.

Definition at line 248 of file Andersens.cpp.

Definition at line 234 of file Andersens.cpp.

ObjectNodes - This map contains entries for each memory object in the program: globals, alloca's and mallocs.

Definition at line 354 of file Andersens.cpp.

Definition at line 143 of file Andersens.cpp.

Referenced by llvm::MachineInstrBuilder::addConstantPoolIndex(), llvm::MachineInstrBuilder::addExternalSymbol(), llvm::addFrameReference(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::MachineInstrBuilder::addMetadata(), llvm::MipsRegisterInfo::adjustMipsStackFrame(), CalculateTailCallArgDest(), CC_MipsO32(), llvm::ComputeMaskedBits(), llvm::ConstantFoldGetElementPtr(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), EmitBranchToAt(), llvm::X86RegisterInfo::emitCalleeSavedFrameMoves(), llvm::AsmPrinter::EmitConstantPool(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::X86RegisterInfo::emitEpilogue(), llvm::SystemZRegisterInfo::emitEpilogue(), llvm::Dwarf::EmitFrameMoves(), llvm::SPURegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), emitSPUpdate(), estimateStackSize(), EvaluateGEPOffsetExpression(), llvm::PIC16TargetLowering::ExpandExternalSymbol(), llvm::PIC16TargetLowering::ExpandFrameIndex(), llvm::PIC16TargetLowering::ExpandGlobalAddress(), ExpandUnalignedLoad(), ExpandUnalignedStore(), llvm::MCAssembler::Finish(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getFieldOffsetExpr(), llvm::X86RegisterInfo::getFrameIndexOffset(), llvm::SystemZRegisterInfo::getFrameIndexOffset(), llvm::SymbolTableListTraits< llvm::GlobalAlias, llvm::Module >::getListOwner(), llvm::ConstantPoolSDNode::getOffset(), llvm::GlobalAddressSDNode::getOffset(), llvm::DIE::getOffset(), GetOffsetFromIndex(), llvm::SelectionDAG::getTargetConstantPool(), llvm::CCState::HandleByVal(), llvm::ConstantPoolSDNode::isMachineConstantPoolEntry(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::MSP430TargetLowering::LowerGlobalAddress(), LowerVASTART(), mergeSPUpdates(), PPCCompilationCallbackC(), llvm::PointerTracking::print(), RemoveFromWorklist(), llvm::DIE::setOffset(), llvm::DIE::SiblingOffset(), llvm::SkipBitcodeWrapperHeader(), llvm::SystemZInstrInfo::spillCalleeSavedRegisters(), SymbolicallyEvaluateGEP(), and llvm::GraphWriter< GraphType >::writeEdge().

Definition at line 221 of file Andersens.cpp.

Definition at line 416 of file Andersens.cpp.

std::vector<int> PEClass2Node

Definition at line 422 of file Andersens.cpp.

std::vector<int> PENLEClass2Node

Definition at line 426 of file Andersens.cpp.

Definition at line 231 of file Andersens.cpp.

Definition at line 225 of file Andersens.cpp.

Definition at line 220 of file Andersens.cpp.

Definition at line 228 of file Andersens.cpp.

std::priority_queue<WorkListElement> Q

ReturnNodes - This map contains an entry for each function in the program that returns a value.

Definition at line 358 of file Andersens.cpp.

std::stack<unsigned> SCCStack

Definition at line 384 of file Andersens.cpp.

std::vector<int> SDT

Definition at line 431 of file Andersens.cpp.

Definition at line 433 of file Andersens.cpp.

const unsigned SelfRep = (unsigned)-1 [static]

Definition at line 94 of file Andersens.cpp.

BitVectorMap Set2PEClass

Definition at line 419 of file Andersens.cpp.

Definition at line 236 of file Andersens.cpp.

Definition at line 392 of file Andersens.cpp.

Definition at line 391 of file Andersens.cpp.

Definition at line 252 of file Andersens.cpp.

enum { ... } Andersens::Constraint::ConstraintType Type

Definition at line 37 of file DerivedTypes.h.

Referenced by llvm::TypeMapBase::~TypeMapBase().

const unsigned Unvisited = (unsigned)-1 [static]

Definition at line 95 of file Andersens.cpp.

Definition at line 218 of file Andersens.cpp.

Referenced by llvm::AliasSetTracker::add(), CanPropagatePredecessorsForPHIs(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::ConstantFoldCastInstruction(), llvm::MachOCodeEmitter::emitConstantPool(), EvaluateConstantChrecAtConstant(), EvaluateFunction(), ExpandUnalignedStore(), llvm::findDbgGlobalDeclare(), llvm::MCValue::get(), llvm::PPC::get_VSPLTI_elt(), llvm::MachineConstantPool::getConstantPoolIndex(), llvm::ConstantPoolSDNode::getConstVal(), getCopyFromParts(), llvm::DenseMapInfo< PointerIntPair< PointerTy, IntBits, IntType > >::getEmptyKey(), llvm::DenseMapInfo< T * >::getEmptyKey(), llvm::ARMConstantPoolValue::getExistingMachineCPValue(), llvm::ConstantPoolSDNode::getMachineCPVal(), getMemsetStringVal(), getMemsetValue(), llvm::SelectionDAG::getNode(), llvm::DenseMapInfo< PointerIntPair< PointerTy, IntBits, IntType > >::getTombstoneKey(), llvm::DenseMapInfo< T * >::getTombstoneKey(), llvm::SelectionDAGLowering::getValue(), llvm::ConstantFP::getValueAPF(), llvm::ExecutionEngine::InitializeMemory(), llvm::UniqueVector< llvm::BasicBlock * >::insert(), isBytewiseValue(), llvm::ConstantFP::isExactlyValue(), llvm::ConstantFP::isNegativeZeroValue(), LLVMConstInBoundsGEP(), llvm::SparcTargetLowering::LowerCall(), llvm::MSP430TargetLowering::LowerSIGN_EXTEND(), llvm::SPU::LowerV2I64Splat(), llvm::make_vector(), llvm::PatternMatch::constantint_ty< Val >::match(), llvm::ISD::OutputArg::OutputArg(), llvm::cl::ParseCommandLineOptions(), llvm::MachineConstantPool::print(), llvm::AsmPrinter::printInlineAsm(), llvm::MSILWriter::printPHICopy(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), llvm::ConstantVector::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::Interpreter::run(), llvm::Use::set(), llvm::TargetLowering::SimplifySetCC(), SortNonLocalDepInfoCache(), SRAGlobal(), llvm::Interpreter::visitStoreInst(), WriteConstantInt(), and llvm::MachineConstantPool::~MachineConstantPool().

ValueNodes - This map indicates the Node that a particular Value* is represented by. This contains entries for all pointers.

Definition at line 350 of file Andersens.cpp.

VarargNodes - This map contains the entry used to represent all pointers passed through the varargs portion of a function call for a particular function. An entry is not present in this map for functions that do not take variable arguments.

Definition at line 364 of file Andersens.cpp.

std::vector<unsigned> VSSCCRep

Definition at line 405 of file Andersens.cpp.

Definition at line 397 of file Andersens.cpp.

Definition at line 397 of file Andersens.cpp.

RegisterPass<Andersens> X("anders-aa","Andersen's Interprocedural Alias Analysis", false, true) [static]