forked from OSchip/llvm-project
Rename DataStructureAnalysis namespace to DS
llvm-svn: 4596
This commit is contained in:
parent
28c34bd8eb
commit
ca03c3b516
|
@ -16,13 +16,7 @@ using std::map;
|
|||
static RegisterAnalysis<BUDataStructures>
|
||||
X("budatastructure", "Bottom-up Data Structure Analysis Closure");
|
||||
|
||||
namespace DataStructureAnalysis { // TODO: FIXME: Eliminate
|
||||
// isPointerType - Return true if this first class type is big enough to hold
|
||||
// a pointer.
|
||||
//
|
||||
bool isPointerType(const Type *Ty);
|
||||
}
|
||||
using namespace DataStructureAnalysis;
|
||||
using namespace DS;
|
||||
|
||||
|
||||
// releaseMemory - If the pass pipeline is done with this pass, we can release
|
||||
|
|
|
@ -20,14 +20,10 @@ namespace {
|
|||
Statistic<> NumFolds("dsnode", "Number of nodes completely folded");
|
||||
};
|
||||
|
||||
namespace DataStructureAnalysis { // TODO: FIXME
|
||||
// isPointerType - Return true if this first class type is big enough to hold
|
||||
// a pointer.
|
||||
//
|
||||
bool isPointerType(const Type *Ty);
|
||||
namespace DS { // TODO: FIXME
|
||||
extern TargetData TD;
|
||||
}
|
||||
using namespace DataStructureAnalysis;
|
||||
using namespace DS;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// DSNode Implementation
|
||||
|
|
|
@ -30,12 +30,9 @@ using std::vector;
|
|||
static RegisterAnalysis<LocalDataStructures>
|
||||
X("datastructure", "Local Data Structure Analysis");
|
||||
|
||||
using namespace DataStructureAnalysis;
|
||||
|
||||
namespace DataStructureAnalysis {
|
||||
namespace DS {
|
||||
// FIXME: Do something smarter with target data!
|
||||
TargetData TD("temp-td");
|
||||
unsigned PointerSize(TD.getPointerSize());
|
||||
|
||||
// isPointerType - Return true if this type is big enough to hold a pointer.
|
||||
bool isPointerType(const Type *Ty) {
|
||||
|
@ -46,6 +43,7 @@ namespace DataStructureAnalysis {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
using namespace DS;
|
||||
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -68,7 +68,7 @@ void TDDataStructures::ResolveCallSite(DSGraph &Graph,
|
|||
|
||||
for (unsigned i = 0, e = CallSite.getNumPtrArgs(); i != e; ++i, ++AI) {
|
||||
// Advance the argument iterator to the first pointer argument...
|
||||
while (!DataStructureAnalysis::isPointerType(AI->getType())) ++AI;
|
||||
while (!DS::isPointerType(AI->getType())) ++AI;
|
||||
|
||||
// TD ...Merge the formal arg scalar with the actual arg node
|
||||
DSNodeHandle &NodeForFormal = Graph.getNodeForValue(AI);
|
||||
|
|
Loading…
Reference in New Issue