[llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 27 14:27:01 PST 2003
Changes in directory poolalloc/lib/PoolAllocate:
PoolAllocate.cpp updated: 1.25 -> 1.26
---
Log message:
Remove a bogus assertion
---
Diffs of the changes: (+3 -14)
Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.25 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.26
--- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.25 Sun Oct 26 17:26:36 2003
+++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Oct 27 14:25:53 2003
@@ -846,22 +846,11 @@
else
V = new CallInst(PAInfo.PoolAlloc, make_vector(PH, 0), Name, &MI);
- //Added by Dinakar to store the type
- // std::cout << " In pool allocation for instruction \n";
- // std::cout << MI << "\n";
- // std::cout << MI.getType() << "\n";
- const Type *phtype = 0;
- if (const PointerType * ptype = dyn_cast<PointerType>(MI.getType())) {
- phtype = ptype->getElementType();
- }
- assert((phtype != 0) && "Needs to be implemented \n ");
+ const Type *phtype = MI.getType()->getElementType();
std::map<const Value*, const Type*> &PoolDescType = FI.PoolDescType;
- if (PoolDescType.count(PH)) {
- //There is already an entry, so this is just sanity check
- assert((phtype == PoolDescType[PH]) && "pool allocate type info wrong");
- } else {
+ if (!PoolDescType.count(PH))
PoolDescType[PH] = phtype;
- }
+
MI.setName(""); // Nuke MIs name
Value *Casted = V;
More information about the llvm-commits
mailing list