diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-01-11 22:24:35 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-01-11 22:24:35 +0000 |
commit | 34ea70a5c9f3d89092c40fe7f3e900dbe3e1c53a (patch) | |
tree | 97ba28700e35481f774d719befcde6f7135f7b93 | |
parent | 7a76845c489f00492c9314180c48782f8ca179cc (diff) | |
download | bcm5719-llvm-34ea70a5c9f3d89092c40fe7f3e900dbe3e1c53a.tar.gz bcm5719-llvm-34ea70a5c9f3d89092c40fe7f3e900dbe3e1c53a.zip |
getParent()->getParent() == getFunction() and clang-format ; NFC
llvm-svn: 257399
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index 7d67f606560..6dfe6259627 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -2099,21 +2099,17 @@ static Constant *computePointerICmp(const DataLayout &DL, // that might be resolve lazily to symbols in another dynamically-loaded // library (and, thus, could be malloc'ed by the implementation). auto IsAllocDisjoint = [](SmallVectorImpl<Value *> &Objects) { - return std::all_of(Objects.begin(), Objects.end(), - [](Value *V){ - if (const AllocaInst *AI = dyn_cast<AllocaInst>(V)) - return AI->getParent() && AI->getParent()->getParent() && - AI->isStaticAlloca(); - if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) - return (GV->hasLocalLinkage() || - GV->hasHiddenVisibility() || - GV->hasProtectedVisibility() || - GV->hasUnnamedAddr()) && - !GV->isThreadLocal(); - if (const Argument *A = dyn_cast<Argument>(V)) - return A->hasByValAttr(); - return false; - }); + return std::all_of(Objects.begin(), Objects.end(), [](Value *V) { + if (const AllocaInst *AI = dyn_cast<AllocaInst>(V)) + return AI->getParent() && AI->getFunction() && AI->isStaticAlloca(); + if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) + return (GV->hasLocalLinkage() || GV->hasHiddenVisibility() || + GV->hasProtectedVisibility() || GV->hasUnnamedAddr()) && + !GV->isThreadLocal(); + if (const Argument *A = dyn_cast<Argument>(V)) + return A->hasByValAttr(); + return false; + }); }; if ((IsNAC(LHSUObjs) && IsAllocDisjoint(RHSUObjs)) || |