LLVM API Documentation
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/Pass.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/ADT/Statistic.h"
#include <set>
#include <iostream>
Include dependency graph for Andersens.cpp:
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "anders-aa" |
Functions | |
ModulePass * | llvm::createAndersensPass () |
Variables | |
Statistic | NumIters ("anders-aa","Number of iterations to reach convergence") |
Statistic | NumConstraints ("anders-aa","Number of constraints") |
Statistic | NumNodes ("anders-aa","Number of nodes") |
Statistic | NumEscapingFunctions ("anders-aa","Number of internal functions that escape") |
Statistic | NumIndirectCallees ("anders-aa","Number of indirect callees found") |
RegisterOpt< Andersens > | X ("anders-aa","Andersen's Interprocedural Alias Analysis") |
RegisterAnalysisGroup< AliasAnalysis, Andersens > | Y |
#define DEBUG_TYPE "anders-aa" |
Definition at line 52 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 168 of file Andersens.cpp.
Referenced by llvm::SelectionDAGLowering::visitInlineAsm().
Definition at line 160 of file Andersens.cpp.
Referenced by llvm::SwitchInst::addCase(), llvm::X86InstrInfo::convertToThreeAddress(), CreateArgv(), executeAddInst(), executeAndInst(), executeDivInst(), executeMulInst(), executeOrInst(), executeRemInst(), executeSetEQInst(), executeSetGEInst(), executeSetGTInst(), executeSetLEInst(), executeSetLTInst(), executeSetNEInst(), executeShlInst(), executeShrInst(), executeSubInst(), executeXorInst(), getCastType(), llvm::ProfileInfo::getEdgeWeight(), GetLinkageResult(), llvm::isCriticalEdge(), LinkFunctionBody(), LinkFunctionProtos(), LinkGlobals(), llvm::Linker::LinkModules(), LinkTypes(), LowerCALL(), llvm::BranchInst::setUnconditionalDest(), llvm::Interpreter::visitBranchInst(), llvm::Interpreter::visitShl(), llvm::Interpreter::visitShr(), llvm::Interpreter::visitSwitchInst(), and llvm::Interpreter::visitVAArgInst().
std::set<Function*> EscapingInternalFunctions |
EscapingInternalFunctions - This set contains all of the internal functions that are found to escape from the program. If the address of an internal function is passed to an external function or otherwise escapes from the analyzed portion of the program, we must assume that any pointer arguments can alias the universal node. This set keeps track of those functions we are assuming to escape so far.
Definition at line 176 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 134 of file Andersens.cpp.
std::map<CallSite, std::vector<Function*> > IndirectCallees |
IndirectCallees - For each call site in the indirect calls list, keep track of the callees that we have discovered so far. As the analysis proceeds, more callees are discovered, until the call graph finally stabilizes.
Definition at line 188 of file Andersens.cpp.
std::vector<CallSite> IndirectCalls |
IndirectCalls - This contains a list of all of the indirect call sites in the program. Since the call graph is iteratively discovered, we may need to add constraints to our graph as we find new targets of function pointers.
Definition at line 182 of file Andersens.cpp.
Statistic NumConstraints("anders-aa","Number of constraints") [static] |
Statistic NumEscapingFunctions("anders-aa","Number of internal functions that escape") [static] |
Statistic NumIndirectCallees("anders-aa","Number of indirect callees found") [static] |
std::map<Value*, unsigned> ObjectNodes |
ObjectNodes - This map contains entries for each memory object in the program: globals, alloca's and mallocs.
Definition at line 142 of file Andersens.cpp.
Definition at line 85 of file Andersens.cpp.
std::map<Function*, unsigned> ReturnNodes |
ReturnNodes - This map contains an entry for each function in the program that returns a value.
Definition at line 146 of file Andersens.cpp.
Referenced by llvm::DSGraph::DSGraph().
Definition at line 160 of file Andersens.cpp.
Referenced by ConvertOperandToType(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::PPCRegisterInfo::emitPrologue(), getCastType(), llvm::ProfileInfo::getEdgeWeight(), llvm::PPCRegisterInfo::getInitialFrameState(), GetLinkageResult(), LinkFunctionBodies(), LinkFunctionBody(), LinkFunctionProtos(), LinkGlobalInits(), LinkGlobals(), llvm::Linker::LinkInModule(), llvm::Linker::LinkModules(), LinkTypes(), LowerFP_TO_SINT(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), llvm::SplitCriticalEdge(), llvm::SelectionDAGLowering::visitMalloc(), llvm::SelectionDAGLowering::visitStore(), and llvm::Interpreter::visitVAArgInst().
enum { ... } Andersens::Constraint::ConstraintType Type |
Definition at line 34 of file DerivedTypes.h.
Definition at line 86 of file Andersens.cpp.
Referenced by llvm::AliasSetTracker::add(), llvm::ScheduleDAG::BuildSchedUnits(), CheckCondition(), CommitValueTo(), CommuteVectorShuffle(), llvm::TargetLowering::ComputeNumSignBits(), llvm::ConstantFoldExtractElementInstruction(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantRange::contains(), llvm::ValID::create(), DecomposeSimpleLinearExpr(), llvm::SelectionDAG::dump(), llvm::SDNode::dump(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::ScheduleDAG::EmitNode(), EmitPreheaderBranchOnCondition(), llvm::SCEVAddRecExpr::evaluateAtIteration(), EvaluateConstantChrecAtConstant(), EvaluateFunction(), EvaluateStoreInto(), llvm::ExtractElementInst::ExtractElementInst(), llvm::PPC::get_VSPLTI_elt(), llvm::MachineConstantPool::getConstantPoolIndex(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getExtractElementTy(), llvm::ConstantExpr::getInsertElement(), llvm::ConstantExpr::getInsertElementTy(), getMemsetStringVal(), getMemsetValue(), llvm::SelectionDAG::getNode(), llvm::SCEVAddRecExpr::getNumIterationsInRange(), llvm::X86::getShufflePSHUFHWImmediate(), llvm::X86::getShufflePSHUFLWImmediate(), llvm::X86::getShuffleSHUFImmediate(), llvm::simplify_type< User::const_op_iterator >::getSimplifiedValue(), llvm::simplify_type< User::op_iterator >::getSimplifiedValue(), llvm::simplify_type< value_use_iterator< const User > >::getSimplifiedValue(), llvm::simplify_type< value_use_iterator< User > >::getSimplifiedValue(), llvm::simplify_type< const Use >::getSimplifiedValue(), llvm::simplify_type< Use >::getSimplifiedValue(), llvm::simplify_type< const SDOperand >::getSimplifiedValue(), llvm::simplify_type< SDOperand >::getSimplifiedValue(), llvm::ConstantFP::getValue(), llvm::SlotTable::hasSlot(), llvm::Use::init(), llvm::ExecutionEngine::InitializeMemory(), llvm::SymbolTable::insert(), isBLACompatibleAddress(), llvm::X86::isMOVSHDUPMask(), llvm::X86::isMOVSLDUPMask(), isPSHUFHW_PSHUFLWMask(), llvm::X86::isPSHUFHWMask(), isRunOfOnes(), IsTrivialUnswitchCondition(), isUndefOrInRange(), llvm::ExtractElementInst::isValidOperands(), llvm::IA64TargetLowering::LowerCallTo(), LowerFORMAL_ARGUMENTS(), llvm::AlphaTargetLowering::LowerOperation(), llvm::make_vector(), MoveImmediateValues(), MoveLoopVariantsToImediateField(), NormalizeMask(), HASH_NAMESPACE::hash< llvm::DSNodeHandle >::operator()(), llvm::Statistic< DataType >::operator=(), llvm::cl::ParseCommandLineOptions(), llvm::BytecodeReader::ParseConstantPoolValue(), PartialFact(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::AsmPrinter::printInlineAsm(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), llvm::ConstantPacked::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::Use::set(), llvm::User::setOperand(), llvm::BranchInst::setOperand(), llvm::ReturnInst::setOperand(), llvm::ShuffleVectorInst::setOperand(), llvm::InsertElementInst::setOperand(), llvm::ExtractElementInst::setOperand(), llvm::SelectInst::setOperand(), llvm::ShiftInst::setOperand(), llvm::StoreInst::setOperand(), llvm::BinaryOperator::setOperand(), llvm::UnaryInstruction::setOperand(), llvm::MemSetInst::setValue(), SetValue(), ShrinkDemandedConstant(), SRAGlobal(), llvm::ExecutionEngine::StoreValueToMemory(), llvm::cl::values(), llvm::cl::ValuesClass< DataType >::ValuesClass(), llvm::Interpreter::visitStoreInst(), and llvm::Use::~Use().
std::map<Value*, unsigned> ValueNodes |
ValueNodes - This map indicates the Node that a particular Value* is represented by. This contains entries for all pointers.
Definition at line 138 of file Andersens.cpp.
std::map<Function*, unsigned> VarargNodes |
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 152 of file Andersens.cpp.
RegisterOpt<Andersens> X("anders-aa","Andersen's Interprocedural Alias Analysis") [static] |
RegisterAnalysisGroup<AliasAnalysis, Andersens> Y [static] |
Definition at line 341 of file Andersens.cpp.