OSDN Git Service

[Inline] Copy "null-pointer-is-valid" attribute in caller.
authorManoj Gupta <manojgupta@google.com>
Mon, 30 Jul 2018 19:33:53 +0000 (19:33 +0000)
committerManoj Gupta <manojgupta@google.com>
Mon, 30 Jul 2018 19:33:53 +0000 (19:33 +0000)
commitb22576f80da5780c56f9957c2fc206757a48ac18
tree75f7ced9f3d20bde75254bf26ae7b47a2598bb74
parent7e678dc65bb7ddadb4ee9f62e567ec176c8b77d9
[Inline] Copy "null-pointer-is-valid" attribute in caller.

Summary:
Normally, inling does not happen if caller does not have
"null-pointer-is-valid"="true" attibute but callee has it.

However, alwaysinline may force callee to be inlined.
In this case, if the caller has the "null-pointer-is-valid"="true"
attribute, copy the attribute to caller.

Reviewers: efriedma, a.elovikov, lebedev.ri, jyknight

Reviewed By: efriedma

Subscribers: eraman, llvm-commits

Differential Revision: https://reviews.llvm.org/D50000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338292 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Attributes.td
lib/IR/Attributes.cpp
test/Transforms/Inline/attributes.ll