aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2020-06-29 15:13:32 -0400
committerMatt Arsenault <Matthew.Arsenault@amd.com>2020-07-16 13:50:49 -0400
commit023883a8346076b2869516c7c0c2fd9e1f139acb (patch)
tree10fa0f9ef402c433ae013d44e7fbac2298495909 /llvm/lib/Analysis/ValueTracking.cpp
parent0347039a6e7daa774d016e0a4e0f2568c7913351 (diff)
downloadllvm-023883a8346076b2869516c7c0c2fd9e1f139acb.zip
llvm-023883a8346076b2869516c7c0c2fd9e1f139acb.tar.gz
llvm-023883a8346076b2869516c7c0c2fd9e1f139acb.tar.bz2
IR: Rename Argument::hasPassPointeeByValueAttr to prepare for byref
When the byref attribute is added, there will need to be two similar functions for the existing cases which have an associate value copy, and byref which does not. Most, but not all of the existing uses will use the existing version. The associated size function added by D82679 also needs to contextually differ, and will help eliminate a few places still relying on pointee element types.
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 306f6a4..bc8f029 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -2362,7 +2362,7 @@ bool isKnownNonZero(const Value *V, const APInt &DemandedElts, unsigned Depth,
// A byval, inalloca may not be null in a non-default addres space. A
// nonnull argument is assumed never 0.
if (const Argument *A = dyn_cast<Argument>(V)) {
- if (((A->hasPassPointeeByValueAttr() &&
+ if (((A->hasPassPointeeByValueCopyAttr() &&
!NullPointerIsDefined(A->getParent(), PtrTy->getAddressSpace())) ||
A->hasNonNullAttr()))
return true;