[llvm] r320944 - Revert "Treat sret arguments as being dereferenceable in getPointerDereferenceableBytes()"
Bjorn Steinbrink via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 17 07:16:51 PST 2017
Author: bsteinbr
Date: Sun Dec 17 07:16:51 2017
New Revision: 320944
URL: http://llvm.org/viewvc/llvm-project?rev=320944&view=rev
Log:
Revert "Treat sret arguments as being dereferenceable in getPointerDereferenceableBytes()"
This reverts commit 8b7a7660a3904b2088bc594311bcea2c651def08.
I didn't mean to commit this.
Modified:
llvm/trunk/lib/IR/Value.cpp
Modified: llvm/trunk/lib/IR/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Value.cpp?rev=320944&r1=320943&r2=320944&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Value.cpp (original)
+++ llvm/trunk/lib/IR/Value.cpp Sun Dec 17 07:16:51 2017
@@ -627,10 +627,9 @@ uint64_t Value::getPointerDereferenceabl
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();
More information about the llvm-commits
mailing list