[PATCH] D65402: [Attributor][MustExec] Deduce dereferenceable and nonnull attribute using MustBeExecutedContextExplorer
Hideto Ueno via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 23:21:17 PDT 2019
uenoku added a comment.
In D65402#1695253 <https://reviews.llvm.org/D65402#1695253>, @jdoerfert wrote:
> In D65402#1694872 <https://reviews.llvm.org/D65402#1694872>, @uenoku wrote:
>
> > Currently, any use is not tracked so nothing about A[1] or A[-2] is deduced.
>
>
> As long as we have a test that is fine.
>
> > This would be solved once making it track gep instruction. But beforehand, I strongly suggest separating deduction for known/assumption respectively.
>
> What do you mean by the separation part?
I mean, running two different deduction scheme(known, assumption) might cause an unpredictable result.
define i32* @test_for_minus_index(i32* %p) {
%q = getelementptr inbounds i32, i32* %p, i32 -2
store i32 1, i32* %q
ret i32* %q
}
AANonNullArgument is composed of AAArgumentFromCallSiteArguments, AAFromMustBeExecutedContext.
Assume that gep is tracked in `followUse`.
Iteration 1 :
- AAFromMustBeExecutedContext will traverse uses of `%p` and prepare uses of `%q` for next iteration.
- AAArgumentFromCallSiteArguments will call `indicatePessimisticFixpoint` because the function is not `internal` function.
AANonNullArgument has already reached to pessimistic fixpoint so nonnull won't be deduced.
This example is so simple that we can debug them but it is hard to debug more complex ones.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65402/new/
https://reviews.llvm.org/D65402
More information about the llvm-commits
mailing list