[llvm-commits] CVS: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Nov 10 12:10:05 PST 2003
Changes in directory poolalloc/lib/PoolAllocate:
TransformFunctionBody.cpp updated: 1.5 -> 1.6
---
Log message:
Do not add a use of the instruction being deleted!!
---
Diffs of the changes: (+5 -4)
Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.5 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.6
--- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.5 Sun Nov 9 19:25:28 2003
+++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Mon Nov 10 12:09:07 2003
@@ -290,8 +290,6 @@
// NB: PH is zero even if the node is collapsed
if (PH == 0) return;
- AddPoolUse(MI, PH, PoolUses);
-
std::string Name = MI.getName(); MI.setName("");
// Insert a call to poolalloc
@@ -303,8 +301,11 @@
AllocSize = BinaryOperator::create(Instruction::Mul, AllocSize,
MI.getOperand(0), "sizetmp", &MI);
- Value *V = new CallInst(PAInfo.PoolAlloc, make_vector(PH, AllocSize, 0),
- Name, &MI);
+ Instruction *V = new CallInst(PAInfo.PoolAlloc, make_vector(PH, AllocSize, 0),
+ Name, &MI);
+
+ AddPoolUse(*V, PH, PoolUses);
+
// Cast to the appropriate type if necessary
Value *Casted = V;
More information about the llvm-commits
mailing list