From 76770e49305c64d67e2e22830a34e6b6d8fa84e6 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 4 Dec 2014 14:22:27 +0000 Subject: Revert r223347 which has caused crashes on bootstrap bots. llvm-svn: 223364 --- llvm/lib/Analysis/InstructionSimplify.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp') diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index 51a295aa5b4..85ebf694e69 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -2026,22 +2026,12 @@ static Constant *computePointerICmp(const DataLayout *DL, }; // Is the set of underlying objects all things which must be disjoint from - // noalias calls. For allocas, we consider only static ones (dynamic - // allocas might be transformed into calls to malloc not simultaneously - // live with the compared-to allocation). For globals, we exclude symbols - // that might be resolve lazily to symbols in another dynamically-loaded - // library (and, thus, could be malloc'ed by the implementation). + // noalias calls. auto IsAllocDisjoint = [](SmallVectorImpl &Objects) { return std::all_of(Objects.begin(), Objects.end(), [](Value *V){ - if (const AllocaInst *AI = dyn_cast(V)) - return AI->isStaticAlloca(); - if (const GlobalValue *GV = dyn_cast(V)) - return (GV->hasLocalLinkage() || - GV->hasHiddenVisibility() || - GV->hasProtectedVisibility() || - GV->hasUnnamedAddr()) && - !GV->isThreadLocal(); + if (isa(V) || isa(V)) + return true; if (const Argument *A = dyn_cast(V)) return A->hasByValAttr(); return false; -- cgit v1.2.3