[llvm-commits] [llvm] r41502 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Rafael Espindola
rafael.espindola at gmail.com
Mon Aug 27 10:48:27 PDT 2007
Author: rafael
Date: Mon Aug 27 12:48:26 2007
New Revision: 41502
URL: http://llvm.org/viewvc/llvm-project?rev=41502&view=rev
Log:
Add a comment about using libc memset/memcpy or generating inline code.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=41502&r1=41501&r2=41502&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Aug 27 12:48:26 2007
@@ -3754,7 +3754,8 @@
ConstantSDNode *I = dyn_cast<ConstantSDNode>(Op.getOperand(3));
// If not DWORD aligned or size is more than the threshold, call memset.
- // It knows how to align to the right boundary first.
+ // The libc version is likely to be faster for these cases. It can use the
+ // address value and run time information about the CPU.
if ((Align & 3) != 0 ||
(I && I->getValue() > Subtarget->getMinRepStrSizeThreshold())) {
MVT::ValueType IntPtr = getPointerTy();
@@ -3910,7 +3911,9 @@
ConstantSDNode *I = dyn_cast<ConstantSDNode>(Op.getOperand(3));
// If not DWORD aligned or size is more than the threshold, call memcpy.
- // It knows how to align to the right boundary first.
+ // The libc version is likely to be faster for these cases. It can use the
+ // address value and run time information about the CPU.
+ // With glibc 2.6.1 on a core 2, coping an array of 100M longs was 30% faster
if ((Align & 3) != 0 ||
(I && I->getValue() > Subtarget->getMinRepStrSizeThreshold())) {
MVT::ValueType IntPtr = getPointerTy();
More information about the llvm-commits
mailing list