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

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



Changes in directory llvm/lib/Target/X86:

X86ISelPattern.cpp updated: 1.153 -> 1.154
---
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:  (+5 -0)

 X86ISelPattern.cpp |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/lib/Target/X86/X86ISelPattern.cpp
diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.153 llvm/lib/Target/X86/X86ISelPattern.cpp:1.154
--- llvm/lib/Target/X86/X86ISelPattern.cpp:1.153	Fri Jul 15 21:02:34 2005
+++ llvm/lib/Target/X86/X86ISelPattern.cpp	Mon Jul 18 23:52:44 2005
@@ -189,6 +189,11 @@
         addLegalFPImmediate(-1.0); // FLD1/FCHS
       }
       computeRegisterProperties();
+
+      maxStoresPerMemSet = 8; // For %llvm.memset -> sequence of stores
+      maxStoresPerMemCpy = 8; // For %llvm.memcpy -> sequence of stores
+      maxStoresPerMemMove = 8; // For %llvm.memmove -> sequence of stores
+      allowUnalignedStores = true; // x86 supports it!
     }
     
     // Return the number of bytes that a function should pop when it returns (in






More information about the llvm-commits mailing list