This is an archive of the discontinued LLVM Phabricator instance.

[AssumeBundles] filter usefull attriutes to preserve
ClosedPublic

Authored by Tyker on Mar 8 2020, 10:10 AM.

Details

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.

Diff Detail

Event Timeline

Tyker created this revision.Mar 8 2020, 10:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2020, 10:10 AM
jdoerfert added inline comments.
llvm/lib/IR/KnowledgeRetention.cpp
109

Are we sure we want to keep a positive list of useful ones? (Instead of a negative list of not-useful ones?)

Tyker marked an inline comment as done.Mar 8 2020, 11:38 AM
Tyker added inline comments.
llvm/lib/IR/KnowledgeRetention.cpp
109

i looked at all attributes we support and most of them aren't useful. so i think the list is shorter this way and will need less updating.

but perhaps a negative pattern has a better default.

jdoerfert accepted this revision.Mar 13 2020, 12:42 AM

LGTM.

llvm/lib/IR/KnowledgeRetention.cpp
109

Let's keep it for now, but at the latest once we have assume ranges it will probably be easier to keep them and opt-out.

This revision is now accepted and ready to land.Mar 13 2020, 12:42 AM
This revision was automatically updated to reflect the committed changes.