diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-08-15 19:23:44 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-08-15 19:23:44 +0000 |
commit | c109ecf5d6f45edee969a74caabf24213a70d6dc (patch) | |
tree | 7f853b0f105802fbeebda3277652cdfc67e1cba2 /include/llvm | |
parent | d1a2039ad2fde73d67ea12d7b40d55bec253febc (diff) | |
download | external_llvm-c109ecf5d6f45edee969a74caabf24213a70d6dc.zip external_llvm-c109ecf5d6f45edee969a74caabf24213a70d6dc.tar.gz external_llvm-c109ecf5d6f45edee969a74caabf24213a70d6dc.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 'include/llvm')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index fda362d..00a455c 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -637,13 +637,13 @@ public: unsigned getMaxStoresPerMemmove() const { return maxStoresPerMemmove; } /// This function returns true if the target allows unaligned memory accesses. - /// This is used, for example, in situations where an array copy/move/set is - /// converted to a sequence of store operations. It's use helps to ensure that - /// such replacements don't generate code that causes an alignment error - /// (trap) on the target machine. + /// of the specified type. This is used, for example, in situations where an + /// array copy/move/set is converted to a sequence of store operations. It's + /// use helps to ensure that such replacements don't generate code that causes + /// an alignment error (trap) on the target machine. /// @brief Determine if the target supports unaligned memory accesses. - bool allowsUnalignedMemoryAccesses() const { - return allowUnalignedMemoryAccesses; + virtual bool allowsUnalignedMemoryAccesses(EVT VT) const { + return false; } /// This function returns true if the target would benefit from code placement @@ -1757,12 +1757,6 @@ protected: /// @brief Specify maximum bytes of store instructions per memmove call. unsigned maxStoresPerMemmove; - /// This field specifies whether the target machine permits unaligned memory - /// accesses. This is used, for example, to determine the size of store - /// operations when copying small arrays and other similar tasks. - /// @brief Indicate whether the target permits unaligned memory accesses. - bool allowUnalignedMemoryAccesses; - /// This field specifies whether the target can benefit from code placement /// optimization. bool benefitFromCodePlacementOpt; |