LLVM API Documentation
#include "llvm/Analysis/DataStructure/DataStructure.h"
#include "llvm/Analysis/DataStructure/DSGraph.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/InstVisitor.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Timer.h"
#include <iostream>
#include "llvm/Module.h"
Include dependency graph for Analysis/DataStructure/Local.cpp:
Go to the source code of this file.
Namespaces | |
namespace | llvm |
namespace | llvm::DS |
namespace | DS |
Functions | |
bool | llvm::DS::isPointerType (const Type *Ty) |
static void | BuildGlobalECs (DSGraph &GG, std::set< GlobalValue * > &ECGlobals) |
static void | EliminateUsesOfECGlobals (DSGraph &G, const std::set< GlobalValue * > &ECGlobals) |
Variables | |
static RegisterAnalysis< LocalDataStructures > | X ("datastructure","Local Data Structure Analysis") |
static cl::opt< bool > | TrackIntegersAsPointers ("dsa-track-integers", cl::Hidden, cl::desc("If this is set, track integers as potential pointers")) |
static cl::list< std::string > | AllocList ("dsa-alloc-list", cl::value_desc("list"), cl::desc("List of functions that allocate memory from the heap"), cl::CommaSeparated, cl::Hidden) |
static cl::list< std::string > | FreeList ("dsa-free-list", cl::value_desc("list"), cl::desc("List of functions that free memory from the heap"), cl::CommaSeparated, cl::Hidden) |
cl::opt< bool > | DisableDirectCallOpt ("disable-direct-call-dsopt", cl::Hidden, cl::desc("Disable direct call optimization in ""DSGraph construction")) |
cl::opt< bool > | DisableFieldSensitivity ("disable-ds-field-sensitivity", cl::Hidden, cl::desc("Disable field sensitivity in DSGraphs")) |
static void BuildGlobalECs | ( | DSGraph & | GG, | |
std::set< GlobalValue * > & | ECGlobals | |||
) | [static] |
BuildGlobalECs - Look at all of the nodes in the globals graph. If any node contains multiple globals, DSA will never, ever, be able to tell the globals apart. Instead of maintaining this information in all of the graphs throughout the entire program, store only a single global (the "leader") in the graphs, and build equivalence classes for the rest of the globals.
Definition at line 1170 of file Analysis/DataStructure/Local.cpp.
References llvm::DSGraph::AssertGraphOK(), DEBUG, E, llvm::DSScalarMap::erase(), llvm::DSScalarMap::find(), llvm::DSScalarMap::getGlobalECs(), llvm::DSGraph::getScalarMap(), GlobalECs, llvm::DSGraph::node_begin(), and llvm::DSGraph::node_end().
static void EliminateUsesOfECGlobals | ( | DSGraph & | G, | |
const std::set< GlobalValue * > & | ECGlobals | |||
) | [static] |
EliminateUsesOfECGlobals - Once we have determined that some globals are in really just equivalent to some other globals, remove the globals from the specified DSGraph (if present), and merge any nodes with their leader nodes.
Definition at line 1205 of file Analysis/DataStructure/Local.cpp.
References llvm::DSNode::addGlobal(), llvm::DSGraph::AssertGraphOK(), DEBUG, E, llvm::DSScalarMap::erase(), G, llvm::DSScalarMap::getGlobalECs(), llvm::DSNodeHandle::getNode(), llvm::DSGraph::getScalarMap(), GI, llvm::DSScalarMap::global_begin(), llvm::DSScalarMap::global_count(), llvm::DSScalarMap::global_end(), GlobalECs, GV, llvm::DSNodeHandle::isNull(), MadeChange, llvm::DSNodeHandle::mergeWith(), and llvm::DSNode::removeGlobal().
cl::list<std::string> AllocList("dsa-alloc-list", cl::value_desc("list"), cl::desc("List of functions that allocate memory from the heap"), cl::CommaSeparated, cl::Hidden) [static] |
cl::opt<bool> DisableDirectCallOpt("disable-direct-call-dsopt", cl::Hidden, cl::desc("Disable direct call optimization in ""DSGraph construction")) [static] |
cl::opt<bool> DisableFieldSensitivity("disable-ds-field-sensitivity", cl::Hidden, cl::desc("Disable field sensitivity in DSGraphs")) [static] |
cl::list<std::string> FreeList("dsa-free-list", cl::value_desc("list"), cl::desc("List of functions that free memory from the heap"), cl::CommaSeparated, cl::Hidden) [static] |
std::list<DSCallSite>* FunctionCalls |
Definition at line 89 of file Analysis/DataStructure/Local.cpp.
Referenced by llvm::DSGraph::DSGraph().
Definition at line 86 of file Analysis/DataStructure/Local.cpp.
Referenced by llvm::DOTGraphTraits< SelectionDAG * >::addCustomGraphFeatures(), llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), CheckAllGraphs(), llvm::DSGraph::cloneInto(), llvm::TDDataStructures::copyValue(), llvm::BUDataStructures::copyValue(), llvm::DSGraph::DSGraph(), llvm::DSNode::DSNode(), llvm::SDNode::dump(), llvm::SUnit::dump(), llvm::SUnit::dumpAll(), DumpNodes(), EliminateUsesOfECGlobals(), llvm::SCEVMulExpr::get(), GetAllAuxCallees(), getCaption(), llvm::GraphTraits< TypePromotionGraph >::getEntryNode(), llvm::GraphTraits< Inverse< const MachineFunction * > >::getEntryNode(), llvm::GraphTraits< Inverse< MachineFunction * > >::getEntryNode(), llvm::GraphTraits< Inverse< const MachineBasicBlock * > >::getEntryNode(), llvm::GraphTraits< Inverse< MachineBasicBlock * > >::getEntryNode(), llvm::GraphTraits< Inverse< Interval * > >::getEntryNode(), llvm::GraphTraits< Inverse< const Function * > >::getEntryNode(), llvm::GraphTraits< Inverse< Function * > >::getEntryNode(), llvm::GraphTraits< Inverse< const BasicBlock * > >::getEntryNode(), llvm::GraphTraits< Inverse< BasicBlock * > >::getEntryNode(), GetGEPOperands(), llvm::DOTGraphTraits< SelectionDAG * >::getGraphName(), llvm::DOTGraphTraits< const DSGraph * >::getGraphName(), llvm::SDNode::getOperationName(), LowerCALL(), llvm::GraphTraits< SelectionDAG * >::nodes_begin(), llvm::GraphTraits< const DSGraph * >::nodes_begin(), llvm::GraphTraits< DSGraph * >::nodes_begin(), llvm::GraphTraits< SelectionDAG * >::nodes_end(), llvm::GraphTraits< const DSGraph * >::nodes_end(), llvm::GraphTraits< DSGraph * >::nodes_end(), llvm::DSNode::print(), llvm::DSGraph::setGlobalsGraph(), llvm::DSNode::setParentGraph(), llvm::SelectionDAGLowering::visitMemIntrinsic(), and llvm::AssemblyWriter::write().
Definition at line 87 of file Analysis/DataStructure/Local.cpp.
Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures().
Definition at line 88 of file Analysis/DataStructure/Local.cpp.
Referenced by llvm::DSGraph::DSGraph().
cl::opt<bool> TrackIntegersAsPointers("dsa-track-integers", cl::Hidden, cl::desc("If this is set, track integers as potential pointers")) [static] |
Referenced by llvm::DS::isPointerType().
RegisterAnalysis<LocalDataStructures> X("datastructure","Local Data Structure Analysis") [static] |