[llvm-commits] CVS: llvm/lib/Target/TargetLowering.cpp

Reid Spencer reid at x10sys.com
Mon Jul 18 21:52:56 PDT 2005

Changes in directory llvm/lib/Target:

TargetLowering.cpp updated: 1.8 -> 1.9
Log message:

For: memory operations -> stores
This is the first incremental patch to implement this feature. It adds no
functionality to LLVM but setup up the information needed from targets in
order to implement the optimization correctly. Each target needs to specify
the maximum number of store operations for conversion of the llvm.memset, 
llvm.memcpy, and llvm.memmove intrinsics into a sequence of store operations.
The limit needs to be chosen at the threshold of performance for such an
optimization (generally smallish). The target also needs to specify whether
the target can support unaligned stores for multi-byte store operations. 
This helps ensure the optimization doesn't generate code that will trap on
an alignment errors.
More patches to follow.

Diffs of the changes:  (+2 -0)

 TargetLowering.cpp |    2 ++
 1 files changed, 2 insertions(+)

Index: llvm/lib/Target/TargetLowering.cpp
diff -u llvm/lib/Target/TargetLowering.cpp:1.8 llvm/lib/Target/TargetLowering.cpp:1.9
--- llvm/lib/Target/TargetLowering.cpp:1.8	Thu Apr 21 17:55:34 2005
+++ llvm/lib/Target/TargetLowering.cpp	Mon Jul 18 23:52:44 2005
@@ -27,6 +27,8 @@
   ShiftAmountTy = SetCCResultTy = PointerTy = getValueType(TD.getIntPtrType());
   ShiftAmtHandling = Undefined;
   memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*));
+  maxStoresPerMemSet = maxStoresPerMemCpy = maxStoresPerMemMove = 0;
+  allowUnalignedStores = false;
 TargetLowering::~TargetLowering() {}

More information about the llvm-commits mailing list