[PATCH] D65402: [Attributor][MustExec] Deduce dereferenceable and nonnull attribute using MustBeExecutedContextExplorer
Hideto Ueno via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 08:17:31 PDT 2019
uenoku added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1546
+ const DataLayout &DL = A.getInfoCache().getDL();
+ if (const Value *Base = getBasePointerOfPointerOperand(I, Offset, DL)) {
+ if (Base == &AssociatedValue) {
----------------
jdoerfert wrote:
> Reading this line it was at first not clear to me that `I` has to be an access for this to return a base pointer.
What does it mean?
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1585
+ (std::to_string(getAssumed()) + "/" + std::to_string(getKnown()));
+ // return getAssumed() ? "nonnull" : "may-null";
}
----------------
jdoerfert wrote:
> Do we want this change or was it just for debugging? Shouldn't it already say "nonnull [fix]" if it is known?
It was just for debugging.
================
Comment at: llvm/test/Transforms/FunctionAttrs/dereferenceable.ll:197
+ ret i32* %ptr
+}
----------------
jdoerfert wrote:
> Is this derived or not? There is the same string after the `FIXME` and `ATTRIBUTOR`, right?
This is derived.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65402/new/
https://reviews.llvm.org/D65402
More information about the llvm-commits
mailing list