[PATCH] D85184: [Attributor][WIP] Deduce noundef attribute
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 21:55:30 PDT 2020
aqjune added a comment.
In D85184#2193446 <https://reviews.llvm.org/D85184#2193446>, @jdoerfert wrote:
> Note: @aqjune, and @okura We should also seed `noundef` in the intrinsics and especially known library functions definitions. I mean, `malloc` is not returning a undef or poison value (I hope), and `free` is not accepting one.
BuildLibCalls.cpp 's inferLibFuncAttributes seems to be the right place for this?
I'll start with adding noundef to return values of library functions.
I think it is safer to gradually add noundef to arguments of library functions, since it may cause end-to-end miscompilation (if there exists any incorrect transformation): IIRC there was a regression from strlen having nonnull attribute at its pointer argument, that happened from its interaction with llvm.assume.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85184/new/
https://reviews.llvm.org/D85184
More information about the llvm-commits
mailing list