diff gen/tollvm.h @ 1210:3d4581761b4c

Add some alignment info where LLVM might otherwise be more pessimistic. In particular, %.nest_arg is always aligned even though it's bitcast from i8*. Pointers in vtables are also guaranteed to be stored at aligned addresses.
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 12 Apr 2009 21:56:43 +0200
parents 2667e3a145be
children 45aca7e7cc88
line wrap: on
line diff
--- a/gen/tollvm.h	Sun Apr 12 20:23:00 2009 +0200
+++ b/gen/tollvm.h	Sun Apr 12 21:56:43 2009 +0200
@@ -63,7 +63,9 @@
 
 // llvm wrappers
 LLValue* DtoLoad(LLValue* src, const char* name=0);
+LLValue* DtoAlignedLoad(LLValue* src, const char* name=0);
 void DtoStore(LLValue* src, LLValue* dst);
+void DtoAlignedStore(LLValue* src, LLValue* dst);
 LLValue* DtoBitCast(LLValue* v, const LLType* t, const char* name=0);
 LLConstant* DtoBitCast(LLConstant* v, const LLType* t);
 
@@ -117,8 +119,9 @@
  * @param dst Destination memory.
  * @param src Source memory.
  * @param nbytes Number of bytes to copy.
+ * @param align The minimum alignment of the source and destination memory.
  */
-void DtoMemCpy(LLValue* dst, LLValue* src, LLValue* nbytes);
+void DtoMemCpy(LLValue* dst, LLValue* src, LLValue* nbytes, unsigned align = 0);
 
 /**
  * Generates a call to C memcmp.