blob: 53c9c94e37cd41ce8c5d21048a65c109ec1b49aa [file] [log] [blame]
Chris Lattner64fd9352002-03-28 18:08:31 +00001//===-- 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
14namespace {
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
33Pass *createPoolAllocatePass() { return new PoolAllocate(); }