X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FLoads.cpp;fp=lib%2FAnalysis%2FLoads.cpp;h=13be270a8528e0df76e9d6fde8225fbb2997e28f;hb=dacb8a615d023cfc1086d69895b7ff5236ac4cff;hp=c79c9afc0f72209860c47985b86ba8fa3fc79aea;hpb=28502a895a1a0eabf4f96596652ed3d2e602c032;p=oota-llvm.git diff --git a/lib/Analysis/Loads.cpp b/lib/Analysis/Loads.cpp index c79c9afc0f7..13be270a852 100644 --- a/lib/Analysis/Loads.cpp +++ b/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;