Remove MallocInst from LLVM Instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Victor Hernandez
2009-10-17 01:18:07 +00:00
parent 3bdd8de280
commit a276c603b8
25 changed files with 73 additions and 677 deletions
+3 -18
View File
@@ -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,