mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user