]> granicus.if.org Git - llvm/commitdiff
Fix the other comment to use modern doxygen style and be a bit more
authorChandler Carruth <chandlerc@gmail.com>
Sat, 18 Oct 2014 23:46:17 +0000 (23:46 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 18 Oct 2014 23:46:17 +0000 (23:46 +0000)
direct. Notably, comment on the fact that the loaded type is significant
in that it determines how wide of an access must be safe.

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

lib/Analysis/Loads.cpp

index c79c9afc0f72209860c47985b86ba8fa3fc79aea..13be270a8528e0df76e9d6fde8225fbb2997e28f 100644 (file)
@@ -53,10 +53,14 @@ static bool AreEquivalentAddressValues(const Value *A, const Value *B) {
   return false;
 }
 
-/// isSafeToLoadUnconditionally - Return true if we know that executing a load
-/// from this value cannot trap.  If it is not obviously safe to load from the
-/// specified pointer, we do a quick local scan of the basic block containing
-/// ScanFrom, to determine if the address is already accessed.
+/// \brief Check if executing a load of this pointer value cannot trap.
+///
+/// If it is not obviously safe to load from the specified pointer, we do
+/// a quick local scan of the basic block containing \c ScanFrom, to determine
+/// if the address is already accessed.
+///
+/// This uses the pointee type to determine how many bytes need to be safe to
+/// load from the pointer.
 bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom,
                                        unsigned Align, const DataLayout *TD) {
   int64_t ByteOffset = 0;