[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Mar 2 18:35:15 PST 2005



Changes in directory llvm-poolalloc/lib/PoolAllocate:

Heuristic.cpp updated: 1.6 -> 1.7
---
Log message:

Handle void -> 0.


---
Diffs of the changes:  (+4 -1)

 Heuristic.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.6 llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.7
--- llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.6	Wed Mar  2 20:24:36 2005
+++ llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp	Wed Mar  2 20:35:02 2005
@@ -92,6 +92,9 @@
 
 unsigned Heuristic::getRecommendedAlignment(const Type *Ty,
                                             const TargetData &TD) {
+  if (Ty == Type::VoidTy)  // Is this void or collapsed?
+    return 0;  // No known alignment, let runtime decide.
+
   return Wants8ByteAlignment(Ty, 0, TD);
 }
 
@@ -101,7 +104,7 @@
 unsigned Heuristic::getRecommendedAlignment(const DSNode *N) {
   if (N->getType() == Type::VoidTy)  // Is this void or collapsed?
     return 0;  // No known alignment, let runtime decide.
-  
+
   const TargetData &TD = N->getParentGraph()->getTargetData();
 
   // If there are no doubles on an 8-byte boundary in this structure, there is






More information about the llvm-commits mailing list