This is an archive of the discontinued LLVM Phabricator instance.

Set local_unnamed_addr for new library function declarations in InjectTLIMappings.
Needs ReviewPublic

Authored by tianqing on Jun 9 2021, 12:55 AM.

Details

Reviewers
fhahn
fpetrogalli
Summary

When InjectTLIMappings constructs the list of vector functions for VFABI attribute, it tries to find each of the functions in the module. If it's absent, a new function declaration is added. In this case, we know the newly added vector function is not used by the original translation unit. It's address is also not used, thus it's good to mark its address insignificant at least at module level.

Diff Detail

Event Timeline

tianqing created this revision.Jun 9 2021, 12:55 AM
tianqing requested review of this revision.Jun 9 2021, 12:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2021, 12:55 AM
tianqing updated this revision to Diff 350805.Jun 9 2021, 1:12 AM
fhahn added a comment.Jun 9 2021, 2:46 AM

Please update the description of the patch with a motivation for the fix and why it is the right thing to do. This will make the change easier to review.

tianqing edited the summary of this revision. (Show Details)Jun 10 2021, 1:22 AM
tianqing updated this revision to Diff 351088.Jun 10 2021, 1:25 AM

Fix typos.