diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 01:18:07 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 01:18:07 +0000 |
commit | a276c603b82a11b0bf0b59f0517a69e4b63adeab (patch) | |
tree | 0bf9c9f1be6d75c1fd4a5811844e196eec7636c9 /lib/Analysis/ValueTracking.cpp | |
parent | 3bdd8de2806e47f34369c1e6ce6e6b44a135bd29 (diff) |
Remove MallocInst from LLVM Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | lib/Analysis/ValueTracking.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index baa347a663..dc0d489047 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -469,26 +469,11 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask, break; } - case Instruction::Alloca: - case Instruction::Malloc: { + case Instruction::Alloca: { AllocationInst *AI = cast<AllocationInst>(V); unsigned Align = AI->getAlignment(); - if (Align == 0 && TD) { - if (isa<AllocaInst>(AI)) - Align = TD->getABITypeAlignment(AI->getType()->getElementType()); - else if (isa<MallocInst>(AI)) { - // Malloc returns maximally aligned memory. - Align = TD->getABITypeAlignment(AI->getType()->getElementType()); - Align = - std::max(Align, - (unsigned)TD->getABITypeAlignment( - Type::getDoubleTy(V->getContext()))); - Align = - std::max(Align, - (unsigned)TD->getABITypeAlignment( - Type::getInt64Ty(V->getContext()))); - } - } + if (Align == 0 && TD) + Align = TD->getABITypeAlignment(AI->getType()->getElementType()); if (Align > 0) KnownZero = Mask & APInt::getLowBitsSet(BitWidth, |