Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,

e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
A update of langref will occur in a subsequent checkin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mon P Wang
2010-03-30 20:55:56 +00:00
parent 04e3b1ef78
commit 808bab0169
27 changed files with 313 additions and 144 deletions

View File

@ -46,8 +46,8 @@ namespace llvm {
/// EmitMemCpy - Emit a call to the memcpy function to the builder. This
/// always expects that the size has type 'intptr_t' and Dst/Src are pointers.
Value *EmitMemCpy(Value *Dst, Value *Src, Value *Len,
unsigned Align, IRBuilder<> &B, const TargetData *TD);
Value *EmitMemCpy(Value *Dst, Value *Src, Value *Len, unsigned Align,
bool isVolatile, IRBuilder<> &B, const TargetData *TD);
/// EmitMemCpyChk - Emit a call to the __memcpy_chk function to the builder.
/// This expects that the Len and ObjSize have type 'intptr_t' and Dst/Src
@ -57,8 +57,8 @@ namespace llvm {
/// EmitMemMove - Emit a call to the memmove function to the builder. This
/// always expects that the size has type 'intptr_t' and Dst/Src are pointers.
Value *EmitMemMove(Value *Dst, Value *Src, Value *Len,
unsigned Align, IRBuilder<> &B, const TargetData *TD);
Value *EmitMemMove(Value *Dst, Value *Src, Value *Len, unsigned Align,
bool isVolatile, IRBuilder<> &B, const TargetData *TD);
/// EmitMemChr - Emit a call to the memchr function. This assumes that Ptr is
/// a pointer, Val is an i32 value, and Len is an 'intptr_t' value.
@ -70,8 +70,8 @@ namespace llvm {
const TargetData *TD);
/// EmitMemSet - Emit a call to the memset function
Value *EmitMemSet(Value *Dst, Value *Val, Value *Len, IRBuilder<> &B,
const TargetData *TD);
Value *EmitMemSet(Value *Dst, Value *Val, Value *Len, bool isVolatile,
IRBuilder<> &B, const TargetData *TD);
/// EmitUnaryFloatFnCall - Emit a call to the unary function named 'Name'
/// (e.g. 'floor'). This function is known to take a single of type matching