aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86ISelLowering.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-08-15 19:23:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-08-15 19:23:44 +0000
commit088880cb192fb6dd5b1bf85af62023c5ca3da38f (patch)
tree7f853b0f105802fbeebda3277652cdfc67e1cba2 /lib/Target/X86/X86ISelLowering.h
parente93f37350d827cc35c151e5820c58c822d33afad (diff)
downloadexternal_llvm-088880cb192fb6dd5b1bf85af62023c5ca3da38f.zip
external_llvm-088880cb192fb6dd5b1bf85af62023c5ca3da38f.tar.gz
external_llvm-088880cb192fb6dd5b1bf85af62023c5ca3da38f.tar.bz2
Change allowsUnalignedMemoryAccesses to take type argument since some targets
support unaligned mem access only for certain types. (Should it be size instead?) ARM v7 supports unaligned access for i16 and i32, some v6 variants support it as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.h')
-rw-r--r--lib/Target/X86/X86ISelLowering.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h
index 3ac6e51..f3f09f5 100644
--- a/lib/Target/X86/X86ISelLowering.h
+++ b/lib/Target/X86/X86ISelLowering.h
@@ -389,10 +389,15 @@ namespace llvm {
/// and store operations as a result of memset, memcpy, and memmove
/// lowering. It returns EVT::iAny if SelectionDAG should be responsible for
/// determining it.
- virtual
- EVT getOptimalMemOpType(uint64_t Size, unsigned Align,
- bool isSrcConst, bool isSrcStr,
- SelectionDAG &DAG) const;
+ virtual EVT getOptimalMemOpType(uint64_t Size, unsigned Align,
+ bool isSrcConst, bool isSrcStr,
+ SelectionDAG &DAG) const;
+
+ /// allowsUnalignedMemoryAccesses - Returns true if the target allows
+ /// unaligned memory accesses. of the specified type.
+ virtual bool allowsUnalignedMemoryAccesses(EVT VT) const {
+ return true;
+ }
/// LowerOperation - Provide custom lowering hooks for some operations.
///