[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 13 13:24:58 PST 2005
Changes in directory llvm-poolalloc/lib/PoolAllocate:
TransformFunctionBody.cpp updated: 1.35 -> 1.36
---
Log message:
Make sure to update the DSGraph for the transformed function to include the
cast inserted for pool frees.
---
Diffs of the changes: (+3 -1)
TransformFunctionBody.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.35 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.36
--- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.35 Sun Jan 30 17:51:25 2005
+++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Sun Feb 13 15:24:43 2005
@@ -202,9 +202,11 @@
// Insert a cast and a call to poolfree...
Value *Casted = Arg;
- if (Arg->getType() != PointerType::get(Type::SByteTy))
+ if (Arg->getType() != PointerType::get(Type::SByteTy)) {
Casted = new CastInst(Arg, PointerType::get(Type::SByteTy),
Arg->getName()+".casted", Where);
+ G.getScalarMap()[Casted] = G.getScalarMap()[Arg];
+ }
CallInst *FreeI = new CallInst(PAInfo.PoolFree, make_vector(PH, Casted, 0),
"", Where);
More information about the llvm-commits
mailing list