mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Revert "Treat sret arguments as being dereferenceable in getPointerDereferenceableBytes()"
This reverts commit 8b7a7660a3904b2088bc594311bcea2c651def08. I didn't mean to commit this. llvm-svn: 320944
This commit is contained in:
parent
7a3b9e8241
commit
65ee49e8fb
@ -627,10 +627,9 @@ uint64_t Value::getPointerDereferenceableBytes(const DataLayout &DL,
|
||||
CanBeNull = false;
|
||||
if (const Argument *A = dyn_cast<Argument>(this)) {
|
||||
DerefBytes = A->getDereferenceableBytes();
|
||||
if (DerefBytes == 0 && (A->hasByValAttr() || A->hasStructRetAttr())) {
|
||||
if (DerefBytes == 0 && A->hasByValAttr()) {
|
||||
Type *PT = cast<PointerType>(A->getType())->getElementType();
|
||||
if (PT->isSized())
|
||||
DerefBytes = DL.getTypeStoreSize(PT);
|
||||
DerefBytes = DL.getTypeStoreSize(PT);
|
||||
}
|
||||
if (DerefBytes == 0) {
|
||||
DerefBytes = A->getDereferenceableOrNullBytes();
|
||||
|
Loading…
Reference in New Issue
Block a user