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