[llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp TransformFunctionBody.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 9 16:47:10 PST 2003
Changes in directory poolalloc/lib/PoolAllocate:
PoolAllocate.cpp updated: 1.33 -> 1.34
TransformFunctionBody.cpp updated: 1.1 -> 1.2
---
Log message:
Uh, these sets where thinko'd. Fix them
---
Diffs of the changes: (+10 -9)
Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.33 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.34
--- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.33 Sun Nov 9 16:14:07 2003
+++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Sun Nov 9 16:46:25 2003
@@ -570,8 +570,8 @@
// Transform the body of the function now... collecting information about uses
// of the pools.
- std::set<Value*, BasicBlock*> PoolUses;
- std::set<Value*, CallInst*> PoolFrees;
+ std::set<std::pair<AllocaInst*, BasicBlock*> > PoolUses;
+ std::set<std::pair<AllocaInst*, CallInst*> > PoolFrees;
TransformBody(G, TDDS->getDSGraph(F), FI, PoolUses, PoolFrees, NewF);
}
Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.1 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.2
--- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.1 Sun Nov 9 16:14:07 2003
+++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Sun Nov 9 16:46:25 2003
@@ -29,16 +29,17 @@
// PoolUses - For each pool (identified by the pool descriptor) keep track
// of which blocks require the memory in the pool to not be freed. This
- // does not include poolfree's.
- std::set<Value*, BasicBlock*> &PoolUses;
+ // does not include poolfree's. Note that this is only tracked for pools
+ // which this is the home of, ie, they are Alloca instructions.
+ std::set<std::pair<AllocaInst*, BasicBlock*> > &PoolUses;
// PoolDestroys - For each pool, keep track of the actual poolfree calls
// inserted into the code. This is seperated out from PoolUses.
- std::set<Value*, CallInst*> &PoolFrees;
+ std::set<std::pair<AllocaInst*, CallInst*> > &PoolFrees;
FuncTransform(PoolAllocate &P, DSGraph &g, DSGraph &tdg, FuncInfo &fi,
- std::set<Value*, BasicBlock*> &poolUses,
- std::set<Value*, CallInst*> &poolFrees)
+ std::set<std::pair<AllocaInst*, BasicBlock*> > &poolUses,
+ std::set<std::pair<AllocaInst*, CallInst*> > &poolFrees)
: PAInfo(P), G(g), TDG(tdg), FI(fi),
PoolUses(poolUses), PoolFrees(poolFrees) {
}
@@ -125,8 +126,8 @@
}
void PoolAllocate::TransformBody(DSGraph &g, DSGraph &tdg, PA::FuncInfo &fi,
- std::set<Value*, BasicBlock*> &poolUses,
- std::set<Value*, CallInst*> &poolFrees,
+ std::set<std::pair<AllocaInst*, BasicBlock*> > &poolUses,
+ std::set<std::pair<AllocaInst*, CallInst*> > &poolFrees,
Function &F) {
FuncTransform(*this, g, tdg, fi, poolUses, poolFrees).visit(F);
}
More information about the llvm-commits
mailing list