diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-08-15 21:56:39 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-08-15 21:56:39 +0000 |
commit | c869b4397aa7c45bfcd71951a1f15e6e7228be79 (patch) | |
tree | ee1c1891633ed132e0a011a12fb1873b9f4b123b /lib | |
parent | 50b37c79203668af8b223710dc6362d399040fdd (diff) | |
download | external_llvm-c869b4397aa7c45bfcd71951a1f15e6e7228be79.zip external_llvm-c869b4397aa7c45bfcd71951a1f15e6e7228be79.tar.gz external_llvm-c869b4397aa7c45bfcd71951a1f15e6e7228be79.tar.bz2 |
Add some comments here because the lack of a check for volatile/atomic here is a bit unusual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/Loads.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Analysis/Loads.cpp b/lib/Analysis/Loads.cpp index 18f3a34..0e6bcbf 100644 --- a/lib/Analysis/Loads.cpp +++ b/lib/Analysis/Loads.cpp @@ -188,12 +188,16 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB, --ScanFrom; // If this is a load of Ptr, the loaded value is available. + // (This is true even if the load is volatile or atomic, although + // those cases are unlikely.) if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) if (AreEquivalentAddressValues(LI->getOperand(0), Ptr)) return LI; if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) { // If this is a store through Ptr, the value is available! + // (This is true even if the store is volatile or atomic, although + // those cases are unlikely.) if (AreEquivalentAddressValues(SI->getOperand(1), Ptr)) return SI->getOperand(0); |