Clean up the formatting and trailing whitespace of a routine before

editting it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220146 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth 2014-10-18 23:19:03 +00:00
parent 440079e53e
commit 01dc911c73

View File

@ -139,9 +139,9 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom,
Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
BasicBlock::iterator &ScanFrom,
unsigned MaxInstsToScan,
AliasAnalysis *AA,
AAMDNodes *AATags) {
if (MaxInstsToScan == 0) MaxInstsToScan = ~0U;
AliasAnalysis *AA, AAMDNodes *AATags) {
if (MaxInstsToScan == 0)
MaxInstsToScan = ~0U;
// If we're using alias analysis to disambiguate get the size of *Ptr.
uint64_t AccessSize = 0;
@ -161,7 +161,8 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
ScanFrom++;
// Don't scan huge blocks.
if (MaxInstsToScan-- == 0) return nullptr;
if (MaxInstsToScan-- == 0)
return nullptr;
--ScanFrom;
// If this is a load of Ptr, the loaded value is available.
@ -169,7 +170,8 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
// those cases are unlikely.)
if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
if (AreEquivalentAddressValues(LI->getOperand(0), Ptr)) {
if (AATags) LI->getAAMetadata(*AATags);
if (AATags)
LI->getAAMetadata(*AATags);
return LI;
}
@ -178,7 +180,8 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
// (This is true even if the store is volatile or atomic, although
// those cases are unlikely.)
if (AreEquivalentAddressValues(SI->getOperand(1), Ptr)) {
if (AATags) SI->getAAMetadata(*AATags);
if (AATags)
SI->getAAMetadata(*AATags);
return SI->getOperand(0);
}