Mercurial > projects > ldc
diff gen/tollvm.h @ 1480:b3ba2c6ff038
Use `llvm.memset` instead of `_d_array_init_i1` and `_d_array_init_i8`.
This exposes what's happening to LLVM, and memset is probably faster than the
runtime functions we were using anyway.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 07 Jun 2009 13:57:59 +0200 |
parents | 83bdf7bed9c5 |
children | 8b9f236dd051 |
line wrap: on
line diff
--- a/gen/tollvm.h Sat Jun 06 20:16:13 2009 +0200 +++ b/gen/tollvm.h Sun Jun 07 13:57:59 2009 +0200 @@ -112,6 +112,14 @@ /** * Generates a call to llvm.memset.i32 (or i64 depending on architecture). * @param dst Destination memory. + * @param val The value to set. + * @param nbytes Number of bytes to overwrite. + */ +void DtoMemSet(LLValue* dst, LLValue* val, LLValue* nbytes); + +/** + * Generates a call to llvm.memset.i32 (or i64 depending on architecture). + * @param dst Destination memory. * @param nbytes Number of bytes to overwrite. */ void DtoMemSetZero(LLValue* dst, LLValue* nbytes);