[PATCH] D76140: [InlineFunction] update nonnnull attribute during inlining
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 09:39:50 PDT 2020
anna created this revision.
anna added reviewers: reames, hfinkel, apilipenko.
Herald added subscribers: llvm-commits, dantrushin, hiraditya.
Herald added a project: LLVM.
When we inline a callee into a callsite that has nonnull attribute on return, we need to add the nonnull attribute on calls that feed into the return value in the calee definition.
Currently, we do this for only for calls feeding into the return. A following patch, will do this also for loads feeding into the return, by adding it as a metadata on the load (i.e. loaded value is nonnull).
The analysis is added to handle the simple cases.
The same will be extended for dereferencability attribute as well.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76140
Files:
llvm/lib/Transforms/Utils/InlineFunction.cpp
llvm/test/Transforms/Inline/nonnull_update.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76140.250231.patch
Type: text/x-patch
Size: 4079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/315b26c8/attachment-0001.bin>
More information about the llvm-commits
mailing list