Chris Lattner | 64fd935 | 2002-03-28 18:08:31 +0000 | [diff] [blame^] | 1 | //===-- PoolAllocate.cpp - Pool Allocation Pass ---------------------------===// |
| 2 | // |
| 3 | // This transform changes programs so that disjoint data structures are |
| 4 | // allocated out of different pools of memory, increasing locality and shrinking |
| 5 | // pointer size. |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "llvm/Transforms/IPO/PoolAllocate.h" |
| 10 | #include "llvm/Analysis/DataStructure.h" |
| 11 | #include "llvm/Pass.h" |
| 12 | |
| 13 | |
| 14 | namespace { |
| 15 | struct PoolAllocate : public Pass { |
| 16 | bool run(Module *M) { |
| 17 | DataStructure &DS = getAnalysis<DataStructure>(); |
| 18 | return false; |
| 19 | } |
| 20 | |
| 21 | // getAnalysisUsageInfo - This function works on the call graph of a module. |
| 22 | // It is capable of updating the call graph to reflect the new state of the |
| 23 | // module. |
| 24 | // |
| 25 | virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Required, |
| 26 | Pass::AnalysisSet &Destroyed, |
| 27 | Pass::AnalysisSet &Provided) { |
| 28 | Required.push_back(DataStructure::ID); |
| 29 | } |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | Pass *createPoolAllocatePass() { return new PoolAllocate(); } |