[AssumeBundles] filter usefull attriutes to preserve
authorTyker <tyker1@outlook.com>
Fri, 13 Mar 2020 13:35:26 +0000 (14:35 +0100)
committerTyker <tyker1@outlook.com>
Fri, 13 Mar 2020 16:35:47 +0000 (17:35 +0100)
commit2543567c414fb82b921485b9923d9ad7e0c7c22b
treedabae282aabd680df014cc78dfed32867b94a1ba
parent69375fd0a30322a09783a18dceca1d09a6a6725c
[AssumeBundles] filter usefull attriutes to preserve

Summary:
This patch will filter attributes to only preserve those that are usefull.
In the case of NoAlias it is filtered out not because it isn't usefull
but because it is incorrect to preserve it as it is only valdi for the
duration of the function.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: jdoerfert, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75828
llvm/lib/IR/KnowledgeRetention.cpp
llvm/test/IR/assume-builder.ll
llvm/test/Transforms/Inline/noalias2.ll
llvm/unittests/IR/KnowledgeRetentionTest.cpp