mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Remove more default address space argument usage.
These places are inconsequential in practice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207021 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -358,7 +358,8 @@ static Value *HandleByValArgument(Value *Arg, Instruction *TheCall,
|
||||
const Function *CalledFunc,
|
||||
InlineFunctionInfo &IFI,
|
||||
unsigned ByValAlignment) {
|
||||
Type *AggTy = cast<PointerType>(Arg->getType())->getElementType();
|
||||
PointerType *ArgTy = cast<PointerType>(Arg->getType());
|
||||
Type *AggTy = ArgTy->getElementType();
|
||||
|
||||
// If the called function is readonly, then it could not mutate the caller's
|
||||
// copy of the byval'd memory. In this case, it is safe to elide the copy and
|
||||
@ -420,8 +421,10 @@ static bool isUsedByLifetimeMarker(Value *V) {
|
||||
// hasLifetimeMarkers - Check whether the given alloca already has
|
||||
// lifetime.start or lifetime.end intrinsics.
|
||||
static bool hasLifetimeMarkers(AllocaInst *AI) {
|
||||
Type *Int8PtrTy = Type::getInt8PtrTy(AI->getType()->getContext());
|
||||
if (AI->getType() == Int8PtrTy)
|
||||
Type *Ty = AI->getType();
|
||||
Type *Int8PtrTy = Type::getInt8PtrTy(Ty->getContext(),
|
||||
Ty->getPointerAddressSpace());
|
||||
if (Ty == Int8PtrTy)
|
||||
return isUsedByLifetimeMarker(AI);
|
||||
|
||||
// Do a scan to find all the casts to i8*.
|
||||
|
Reference in New Issue
Block a user