[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp

Chris Lattner sabre at nondot.org
Sat Jan 20 14:36:29 PST 2007



Changes in directory llvm/lib/ExecutionEngine/JIT:

JIT.cpp updated: 1.89 -> 1.90
---
Log message:

Teach TargetData to handle 'preferred' alignment for each target, and use 
these alignment amounts to align scalars when we can.  Patch by Scott Michel!



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

 JIT.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.89 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.90
--- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.89	Fri Jan 12 01:05:13 2007
+++ llvm/lib/ExecutionEngine/JIT/JIT.cpp	Sat Jan 20 16:35:55 2007
@@ -338,7 +338,7 @@
     // compilation.
     const Type *GlobalType = GV->getType()->getElementType();
     size_t S = getTargetData()->getTypeSize(GlobalType);
-    size_t A = getTargetData()->getTypeAlignment(GlobalType);
+    size_t A = getTargetData()->getTypeAlignmentPref(GlobalType);
     if (A <= 8) {
       Ptr = malloc(S);
     } else {






More information about the llvm-commits mailing list