[llvm-commits] Patch: address space support for memcpy/memmove/memset

Chris Lattner clattner at apple.com
Fri Mar 26 16:44:23 PDT 2010


On Mar 24, 2010, at 4:01 PM, Mon Ping Wang wrote:

> 
> This is a patch to add support for address spaces for memcpy, memmove, and memset.  I have changed the signature of these functions to be overloaded based on the pointer type.  I have included both the llvm changes and the llvm-gcc-4.2 changes need to support.  Please let me know if I miss something.  I'll check it in a few days.

Should the source and destination pointers be required to be in the same address space?  I can see it either way (f.e. on x86 a copy from DS -> GS segment address space makes sense), but it would be nice to reduce noisiness in the function name if a copy from one addr space to another isn't useful.

Other than that, this patch looks great to me, but "while you're at it" can you add an "i1 isVolatile" parameter to llvm.memcpy and friends?

-Chris



More information about the llvm-commits mailing list