[all-commits] [llvm/llvm-project] 67aac9: [BuildLibCalls] Add noundef to the returned pointe...
Juneyoung Lee via All-commits
all-commits at lists.llvm.org
Tue Sep 29 10:14:28 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 67aac915ba94a75cbdb3c9c5f6c8e9904829ce37
https://github.com/llvm/llvm-project/commit/67aac915ba94a75cbdb3c9c5f6c8e9904829ce37
Author: Juneyoung Lee <aqjune at gmail.com>
Date: 2020-09-30 (Wed, 30 Sep 2020)
Changed paths:
M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
M llvm/test/Transforms/InferFunctionAttrs/annotate.ll
Log Message:
-----------
[BuildLibCalls] Add noundef to the returned pointers of allocators and argument of free
This patch adds noundef to the returned pointers of allocators (malloc, calloc, ...)
and the pointer argument of free.
The returned pointer of allocators cannot be poison or (partially) undef.
Since the pointer that is given to free should precisely have zero offset,
it cannot be poison or (partially) undef too.
For the size arguments of allocators, noundef wasn't attached simply because
I wasn't sure whether attaching it is okay or not.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D87984
More information about the All-commits
mailing list