aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/IPO/OldPoolAllocate.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/OldPoolAllocate.cpp b/lib/Transforms/IPO/OldPoolAllocate.cpp
new file mode 100644
index 0000000000..53c9c94e37
--- /dev/null
+++ b/lib/Transforms/IPO/OldPoolAllocate.cpp
@@ -0,0 +1,33 @@
+//===-- PoolAllocate.cpp - Pool Allocation Pass ---------------------------===//
+//
+// This transform changes programs so that disjoint data structures are
+// allocated out of different pools of memory, increasing locality and shrinking
+// pointer size.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Transforms/IPO/PoolAllocate.h"
+#include "llvm/Analysis/DataStructure.h"
+#include "llvm/Pass.h"
+
+
+namespace {
+ struct PoolAllocate : public Pass {
+ bool run(Module *M) {
+ DataStructure &DS = getAnalysis<DataStructure>();
+ return false;
+ }
+
+ // getAnalysisUsageInfo - This function works on the call graph of a module.
+ // It is capable of updating the call graph to reflect the new state of the
+ // module.
+ //
+ virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Required,
+ Pass::AnalysisSet &Destroyed,
+ Pass::AnalysisSet &Provided) {
+ Required.push_back(DataStructure::ID);
+ }
+ };
+}
+
+Pass *createPoolAllocatePass() { return new PoolAllocate(); }