#include "Support/Statistic.h"
#include "Support/Debug.h"
#include "DSCallSiteIterator.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph");
//Graph.writeGraphToFile(std::cerr, "bu_" + F.getName());
}
-
-} // End llvm namespace
#include "Support/Statistic.h"
#include "Support/Timer.h"
#include <algorithm>
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<> NumFolds ("dsnode", "Number of nodes completely folded");
if (unsigned(N2Idx)+i < N2Size)
computeNodeMapping(N1->getLink(i), N2->getLink(N2Idx+i), NodeMap);
}
-
-} // End llvm namespace
#include "llvm/Analysis/DSGraph.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Module.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
class DSAA : public Pass, public AliasAnalysis {
return getAnalysis<AliasAnalysis>().getMustAliases(P, RetVals);
}
-} // End llvm namespace
#include "llvm/Module.h"
#include "llvm/Constant.h"
#include "Support/Statistic.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<>
}
return Changed;
}
-
-} // End llvm namespace
#include "llvm/Support/InstVisitor.h"
#include "Support/Statistic.h"
#include <vector>
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<> TotalNumCallees("totalcallees",
visit(F);
return true;
}
-
-} // End llvm namespace
#include "llvm/Value.h"
#include <set>
-namespace llvm {
+using namespace llvm;
namespace {
enum DSPass { local, bu, td };
}
}
}
-
-} // End llvm namespace
//
#include "llvm/Module.h"
-namespace llvm {
+using namespace llvm;
static RegisterAnalysis<LocalDataStructures>
X("datastructure", "Local Data Structure Analysis");
+namespace llvm {
namespace DS {
// isPointerType - Return true if this type is big enough to hold a pointer.
bool isPointerType(const Type *Ty) {
return Ty->getPrimitiveSize() >= PointerSize;
return false;
}
-}
+}}
using namespace DS;
GlobalsGraph = 0;
}
-} // End llvm namespace
#include "Support/Statistic.h"
#include <fstream>
#include <sstream>
-
-namespace llvm {
+using namespace llvm;
// OnlyPrintMain - The DataStructure printer exposes this option to allow
// printing of only the graph for "main".
return OS.str();
}
+namespace llvm {
template<>
struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
static std::string getGraphName(const DSGraph *G) {
}
}
};
+} // end namespace llvm
void DSNode::print(std::ostream &O, const DSGraph *G) const {
GraphWriter<const DSGraph *> W(O, G);
printCollection(*this, O, M, "td.");
}
-} // End llvm namespace
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Module.h"
#include "Support/Debug.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
class Steens : public Pass, public AliasAnalysis {
//
return getAnalysis<AliasAnalysis>().alias(V1, V1Size, V2, V2Size);
}
-
-} // End llvm namespace
#include "llvm/Analysis/DSGraph.h"
#include "Support/Debug.h"
#include "Support/Statistic.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
RegisterAnalysis<TDDataStructures> // Register the pass
<< Graph.getFunctionNames() << " [" << Graph.getGraphSize() << "+"
<< Graph.getFunctionCalls().size() << "]\n");
}
-
-} // End llvm namespace