diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-10-18 23:46:17 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-10-18 23:46:17 +0000 |
commit | 1f27f038494365f04d0aa44a6c5f2cef6e76a686 (patch) | |
tree | 42876d3d9dfec2a807380993e97dd1e951acc8dd /llvm/lib/Analysis/Loads.cpp | |
parent | be49df3d2cd80c8af446f4074f40020401666e53 (diff) | |
download | bcm5719-llvm-1f27f038494365f04d0aa44a6c5f2cef6e76a686.tar.gz bcm5719-llvm-1f27f038494365f04d0aa44a6c5f2cef6e76a686.zip |
Fix the other comment to use modern doxygen style and be a bit more
direct. Notably, comment on the fact that the loaded type is significant
in that it determines how wide of an access must be safe.
llvm-svn: 220150
Diffstat (limited to 'llvm/lib/Analysis/Loads.cpp')
-rw-r--r-- | llvm/lib/Analysis/Loads.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp index c79c9afc0f7..13be270a852 100644 --- a/llvm/lib/Analysis/Loads.cpp +++ b/llvm/lib/Analysis/Loads.cpp @@ -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; |