aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-08-15 21:14:01 +0000
committerBill Wendling <isanbard@gmail.com>2009-08-15 21:14:01 +0000
commitf865ea85bd9d3e04aa795ee03cfc8db339f8c9b9 (patch)
tree720d75e27033c722c2f2d09c7c925e4ed78e09bb /include
parenta130a511f46e0e8ed73a00a945822c87fea35def (diff)
Revert r79127. It was causing compilation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79135 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetLowering.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 00a455c360..fda362d8ce 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.
- /// 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.
+ /// 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.
- virtual bool allowsUnalignedMemoryAccesses(EVT VT) const {
- return false;
+ bool allowsUnalignedMemoryAccesses() const {
+ return allowUnalignedMemoryAccesses;
}
/// This function returns true if the target would benefit from code placement
@@ -1757,6 +1757,12 @@ 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;