[PATCH] D105313: [ValueTracking] Use call arguments for nonnull attribute check
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 1 16:22:31 PDT 2021
dexonsmith added inline comments.
================
Comment at: llvm/lib/IR/Instructions.cpp:325
+bool CallBase::paramIsNonNull(unsigned ArgNo, bool AllowUndefOrPoison) const {
+ Type *ArgType = getArgOperand(ArgNo)->getType();
----------------
I wonder if (some or most of) this logic could be factored out of here and `Argument::hasNonNullAttr()` if the common implementation took the `Type` and an `AttributeList` as parameters?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105313/new/
https://reviews.llvm.org/D105313
More information about the llvm-commits
mailing list