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

Chris Lattner lattner at cs.uiuc.edu
Wed Apr 20 05:06:00 PDT 2005



Changes in directory llvm-poolalloc/lib/PoolAllocate:

Heuristic.cpp updated: 1.10 -> 1.11
---
Log message:

add an option to force 8-byte alignment


---
Diffs of the changes:  (+6 -0)

 Heuristic.cpp |    6 ++++++
 1 files changed, 6 insertions(+)


Index: llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.10 llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.11
--- llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.10	Mon Apr 11 16:34:22 2005
+++ llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp	Wed Apr 20 07:05:43 2005
@@ -45,6 +45,10 @@
                clEnumVal(NoNodes, "  Do not pool allocate anything"),
                clEnumValEnd),
     cl::init(AllButUnreachableFromMemory)); 
+
+  cl::opt<bool>
+  DisableAlignOpt("poolalloc-disable-alignopt",
+                  cl::desc("Force all pool alignment to 8 bytes"));
 }
 
 Heuristic::~Heuristic() {}
@@ -61,6 +65,8 @@
 /// Wants8ByteAlignment - FIXME: this is a complete hack for X86 right now.
 static bool Wants8ByteAlignment(const Type *Ty, unsigned Offs,
                                 const TargetData &TD) {
+  if (DisableAlignOpt) return true;
+
   if ((Offs & 7) == 0) {
     // Doubles always want to be 8-byte aligned.
     if (Ty == Type::DoubleTy) return true;






More information about the llvm-commits mailing list