This is an archive of the discontinued LLVM Phabricator instance.

[ForceFunctionAttrs] Make options additionally work over entire module
AbandonedPublic

Authored by aidengrossman on Aug 25 2023, 1:17 PM.

Details

Reviewers
None
Summary

This patch makes the -force-attribute and -force-remove-attribute flags
in the forceattrs pass additionally work over all the functions in a
module rather than on specific functions. I often
find myself dealing with bitcode from projects with arbitrary build
systems that have applied the optnone attribute for various reasons and
having the ability to do this in opt would be quite convenient. It's
possible to remove the attribute by disassembling to textual IR, running
sed, and then running opt over the result, but this option makes things
just a bit easier.

Diff Detail

Event Timeline

aidengrossman created this revision.Aug 25 2023, 1:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2023, 1:17 PM
aidengrossman requested review of this revision.Aug 25 2023, 1:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2023, 1:17 PM
aidengrossman abandoned this revision.Aug 25 2023, 1:18 PM