diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-28 18:08:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-28 18:08:31 +0000 |
commit | 64fd935489d5881ad5ce71008b0a1fbdec00ac75 (patch) | |
tree | b59990f39f413d9f5d157fa597424dcda159a411 /llvm/lib/Transforms | |
parent | b9530575ef1a75bd80c179af71dd26e1dd0c08c8 (diff) | |
download | bcm5719-llvm-64fd935489d5881ad5ce71008b0a1fbdec00ac75.tar.gz bcm5719-llvm-64fd935489d5881ad5ce71008b0a1fbdec00ac75.zip |
Initial checkin of Noop pass that will be the pool allocator
llvm-svn: 2014
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/OldPoolAllocate.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/OldPoolAllocate.cpp b/llvm/lib/Transforms/IPO/OldPoolAllocate.cpp new file mode 100644 index 00000000000..53c9c94e37c --- /dev/null +++ b/llvm/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(); } |