[llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Mar 2 16:00:38 PST 2006



Changes in directory llvm/lib/CodeGen:

IntrinsicLowering.cpp updated: 1.39 -> 1.40
---
Log message:

Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709: http://llvm.cs.uiuc.edu/PR709 , and paving the way for future progress.



---
Diffs of the changes:  (+12 -6)

 IntrinsicLowering.cpp |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.39 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.40
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.39	Mon Jan 16 15:12:35 2006
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp	Thu Mar  2 18:00:25 2006
@@ -99,15 +99,18 @@
         EnsureFunctionExists(M, "abort", I->arg_end(), I->arg_end(),
                              Type::VoidTy);
         break;
-      case Intrinsic::memcpy:
+      case Intrinsic::memcpy_i32:
+      case Intrinsic::memcpy_i64:
         EnsureFunctionExists(M, "memcpy", I->arg_begin(), --I->arg_end(),
                              I->arg_begin()->getType());
         break;
-      case Intrinsic::memmove:
+      case Intrinsic::memmove_i32:
+      case Intrinsic::memmove_i64:
         EnsureFunctionExists(M, "memmove", I->arg_begin(), --I->arg_end(),
                              I->arg_begin()->getType());
         break;
-      case Intrinsic::memset:
+      case Intrinsic::memset_i32:
+      case Intrinsic::memset_i64:
         M.getOrInsertFunction("memset", PointerType::get(Type::SByteTy),
                               PointerType::get(Type::SByteTy),
                               Type::IntTy, (--(--I->arg_end()))->getType(),
@@ -405,7 +408,8 @@
       CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
     break;    // Simply strip out debugging intrinsics
 
-  case Intrinsic::memcpy: {
+  case Intrinsic::memcpy_i32:
+  case Intrinsic::memcpy_i64: {
     // The memcpy intrinsic take an extra alignment argument that the memcpy
     // libc function does not.
     static Function *MemcpyFCache = 0;
@@ -413,7 +417,8 @@
                     (*(CI->op_begin()+1))->getType(), MemcpyFCache);
     break;
   }
-  case Intrinsic::memmove: {
+  case Intrinsic::memmove_i32: 
+  case Intrinsic::memmove_i64: {
     // The memmove intrinsic take an extra alignment argument that the memmove
     // libc function does not.
     static Function *MemmoveFCache = 0;
@@ -421,7 +426,8 @@
                     (*(CI->op_begin()+1))->getType(), MemmoveFCache);
     break;
   }
-  case Intrinsic::memset: {
+  case Intrinsic::memset_i32:
+  case Intrinsic::memset_i64: {
     // The memset intrinsic take an extra alignment argument that the memset
     // libc function does not.
     static Function *MemsetFCache = 0;






More information about the llvm-commits mailing list