mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-19 13:38:56 +00:00
Refine this to only apply to null in the default address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e03a39b096
commit
6d903092c9
@ -107,8 +107,10 @@ bool llvm::PointerMayBeCaptured(const Value *V,
|
|||||||
break;
|
break;
|
||||||
case Instruction::ICmp:
|
case Instruction::ICmp:
|
||||||
// Comparing the pointer against null does not count as a capture.
|
// Comparing the pointer against null does not count as a capture.
|
||||||
if (isa<ConstantPointerNull>(I->getOperand(1)))
|
if (ConstantPointerNull *CPN =
|
||||||
break;
|
dyn_cast<ConstantPointerNull>(I->getOperand(1)))
|
||||||
|
if (CPN->getType()->getAddressSpace() == 0)
|
||||||
|
break;
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
// Something else - be conservative and say it is captured.
|
// Something else - be conservative and say it is captured.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user