Change the names of member variables per Chris' instructions, and document
authorReid Spencer <rspencer@reidspencer.com>
Sat, 27 Aug 2005 19:09:02 +0000 (19:09 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 27 Aug 2005 19:09:02 +0000 (19:09 +0000)
them more clearly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23118 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/TargetLowering.cpp

index 590de20dc81e4cf79218d5dfc6a9872af4636882..7c2839176f80a50877f5c849bd598f934ab1f1e5 100644 (file)
@@ -210,12 +210,14 @@ public:
   /// @brief Get maximum # of store operations permitted for llvm.memmove
   unsigned getMaxStoresPerMemMove() const { return maxStoresPerMemMove; }
 
-  /// This function returns true if the target allows unaligned stores. This is
-  /// used in situations where an array copy/move/set is converted to a sequence
-  /// of store operations. It ensures that such replacements don't generate
-  /// code that causes an alignment error (trap) on the target machine.
-  /// @brief Determine if the target supports unaligned stores.
-  bool allowsUnalignedStores() const { return allowUnalignedStores; }
+  /// 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. 
+  /// @brief Determine if the target supports unaligned memory accesses.
+  bool allowsUnalignedMemoryAccesses() const 
+    { return allowUnalignedMemoryAccesses; }
 
   //===--------------------------------------------------------------------===//
   // TargetLowering Configuration Methods - These methods should be invoked by
@@ -442,11 +444,11 @@ protected:
   /// @brief Specify maximum bytes of store instructions per memmove call.
   unsigned maxStoresPerMemMove;
 
-  /// This field specifies whether the target machine permits unaligned stores.
-  /// This is used to determine the size of store operations for copying
-  /// small arrays and other similar tasks.
-  /// @brief Indicate whether the target machine permits unaligned stores.
-  bool allowUnalignedStores;
+  /// 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;
 };
 } // end llvm namespace
 
index d3fa34dbee3eb9947b9ee572bee9cc864d10c827..3c2a09cfbd7092be7a238ab458dcae927f93b2bf 100644 (file)
@@ -27,8 +27,8 @@ TargetLowering::TargetLowering(TargetMachine &tm)
   ShiftAmountTy = SetCCResultTy = PointerTy = getValueType(TD.getIntPtrType());
   ShiftAmtHandling = Undefined;
   memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*));
-  maxStoresPerMemSet = maxStoresPerMemCpy = maxStoresPerMemMove = 0;
-  allowUnalignedStores = false;
+  maxStoresPerMemSet = maxStoresPerMemCpy = maxStoresPerMemMove = 8;
+  allowUnalignedMemoryAccesses = false;
 }
 
 TargetLowering::~TargetLowering() {}