aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-05-15 08:39:06 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-05-15 08:39:06 +0000
commitf0df03134e698ea84e9cc1c28a853f83c02560d5 (patch)
treeb01b44346fb05a4fd5cead63b65f2bcba2c15b67 /include
parent38503d404683830588af8ce1e67aefa1eb584f12 (diff)
downloadexternal_llvm-f0df03134e698ea84e9cc1c28a853f83c02560d5.zip
external_llvm-f0df03134e698ea84e9cc1c28a853f83c02560d5.tar.gz
external_llvm-f0df03134e698ea84e9cc1c28a853f83c02560d5.tar.bz2
Make use of vector load and store operations to implement memcpy, memmove, and memset. Currently only X86 target is taking advantage of these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h7
-rw-r--r--include/llvm/Target/TargetLowering.h9
2 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 592c17f..5ad523f 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -210,6 +210,13 @@ public:
return Objects[ObjectIdx+NumFixedObjects].Alignment;
}
+ /// setObjectAlignment - Change the alignment of the spcified stack object...
+ void setObjectAlignment(int ObjectIdx, unsigned Align) {
+ assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
+ "Invalid Object Idx!");
+ Objects[ObjectIdx+NumFixedObjects].Alignment = Align;
+ }
+
/// getObjectOffset - Return the assigned stack offset of the specified object
/// from the incoming stack pointer.
///
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index ffc927a..c5c6f6c 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -510,6 +510,15 @@ public:
bool allowsUnalignedMemoryAccesses() const {
return allowUnalignedMemoryAccesses;
}
+
+ /// getOptimalMemOpType - Returns the target specific optimal type for load
+ /// store operations as result of memset, memcpy, and memmove lowering.
+ /// It returns MVT::iAny if SelectionDAG should be responsible for
+ /// determining it.
+ virtual MVT::ValueType getOptimalMemOpType(uint64_t Size, unsigned Align,
+ bool isSrcConst, bool isSrcStr) const {
+ return MVT::iAny;
+ }
/// usesUnderscoreSetJmp - Determine if we should use _setjmp or setjmp
/// to implement llvm.setjmp.