mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -806,7 +806,8 @@ unsigned llvm::getOrEnforceKnownAlignment(Value *V, unsigned PrefAlign,
|
||||
const DataLayout *TD) {
|
||||
assert(V->getType()->isPointerTy() &&
|
||||
"getOrEnforceKnownAlignment expects a pointer!");
|
||||
unsigned BitWidth = TD ? TD->getPointerSizeInBits() : 64;
|
||||
unsigned AS = cast<PointerType>(V->getType())->getAddressSpace();
|
||||
unsigned BitWidth = TD ? TD->getPointerSizeInBits(AS) : 64;
|
||||
APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0);
|
||||
ComputeMaskedBits(V, KnownZero, KnownOne, TD);
|
||||
unsigned TrailZ = KnownZero.countTrailingOnes();
|
||||
|
Reference in New Issue
Block a user