mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 20:04:03 +00:00
Initial checkin of Noop pass that will be the pool allocator
llvm-svn: 2014
This commit is contained in:
parent
73edb721e8
commit
0336a78488
33
lib/Transforms/IPO/OldPoolAllocate.cpp
Normal file
33
lib/Transforms/IPO/OldPoolAllocate.cpp
Normal file
@ -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(); }
|
Loading…
Reference in New Issue
Block a user