This is an archive of the discontinued LLVM Phabricator instance.

BuildLibCalls: simplify switch statement slightly
ClosedPublic

Authored by durin42 on May 3 2022, 9:12 AM.

Details

Summary

Per feedback on D123086 after submit.

Also added a test for vec_malloc et al attribute inference to show it's
doing the right thing.

The new tests exposed a defect, corrected by adding vec_free to the list of
free functions in MemoryBuiltins.cpp, which had been overlooked all the
way back in D94710, over a year ago.

Diff Detail

Event Timeline

durin42 created this revision.May 3 2022, 9:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2022, 9:12 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
durin42 requested review of this revision.May 3 2022, 9:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2022, 9:12 AM
durin42 updated this revision to Diff 426741.May 3 2022, 9:15 AM
nikic added inline comments.May 3 2022, 9:22 AM
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
447

Can you please also update the similar vec_realloc/vec_calloc/vec_free cases?

durin42 updated this revision to Diff 426750.May 3 2022, 9:44 AM
durin42 edited the summary of this revision. (Show Details)
durin42 marked an inline comment as done.May 3 2022, 9:44 AM
nikic accepted this revision.May 3 2022, 9:48 AM

LGTM

This revision is now accepted and ready to land.May 3 2022, 9:48 AM
This revision was landed with ongoing or failed builds.May 3 2022, 10:17 AM
This revision was automatically updated to reflect the committed changes.