X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FLoads.cpp;fp=lib%2FAnalysis%2FLoads.cpp;h=c79c9afc0f72209860c47985b86ba8fa3fc79aea;hb=28502a895a1a0eabf4f96596652ed3d2e602c032;hp=1c3e281dffb0163d5603b04f1fb831f24b12f6ca;hpb=e99ca835bc15dbfda5b3eae0579a1451201c8349;p=oota-llvm.git diff --git a/lib/Analysis/Loads.cpp b/lib/Analysis/Loads.cpp index 1c3e281dffb..c79c9afc0f7 100644 --- a/lib/Analysis/Loads.cpp +++ b/lib/Analysis/Loads.cpp @@ -35,15 +35,16 @@ using namespace llvm; /// static bool AreEquivalentAddressValues(const Value *A, const Value *B) { // Test if the values are trivially equivalent. - if (A == B) return true; + if (A == B) + return true; // Test if the values come from identical arithmetic instructions. // Use isIdenticalToWhenDefined instead of isIdenticalTo because // this function is only used when one address use dominates the // other, which means that they'll always either have the same // value or one of them will have an undefined value. - if (isa(A) || isa(A) || - isa(A) || isa(A)) + if (isa(A) || isa(A) || isa(A) || + isa(A)) if (const Instruction *BI = dyn_cast(B)) if (cast(A)->isIdenticalToWhenDefined(BI)) return true; @@ -114,9 +115,11 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom, return false; if (LoadInst *LI = dyn_cast(BBI)) { - if (AreEquivalentAddressValues(LI->getOperand(0), V)) return true; + if (AreEquivalentAddressValues(LI->getOperand(0), V)) + return true; } else if (StoreInst *SI = dyn_cast(BBI)) { - if (AreEquivalentAddressValues(SI->getOperand(1), V)) return true; + if (AreEquivalentAddressValues(SI->getOperand(1), V)) + return true; } } return false;