mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
bitcasts of pointers are always pointers.
If we see a memcpy of a pointer, make sure to check later uses of the pointer as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
823391ae6e
commit
0ab5a4ae55
@ -219,8 +219,6 @@ static bool AddressMightEscape(const Value *V) {
|
||||
return true;
|
||||
break; // next use.
|
||||
case Instruction::BitCast:
|
||||
if (!isa<PointerType>(I->getType()))
|
||||
return true;
|
||||
if (AddressMightEscape(I))
|
||||
return true;
|
||||
break; // next use
|
||||
@ -231,10 +229,9 @@ static bool AddressMightEscape(const Value *V) {
|
||||
case Instruction::Call:
|
||||
// If the call is to a few known safe intrinsics, we know that it does
|
||||
// not escape
|
||||
if (isa<MemIntrinsic>(I))
|
||||
return false;
|
||||
else
|
||||
if (!isa<MemIntrinsic>(I))
|
||||
return true;
|
||||
break; // next use
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user