This is an archive of the discontinued LLVM Phabricator instance.

MemoryBuiltins: replace most users of isFreeCall with isFreeLikeCall
AbandonedPublic

Authored by durin42 on Apr 25 2022, 5:16 PM.

Details

Summary

With our new attributes-based approach to handling allocator functions,
we need to differentiate between "is this literally free()" and "is this
a function which frees the given pointer." This change introduces the
new function to check for the latter category and moves the easy cases
throughout the codebase to check that instead of literally-free().

Diff Detail

Unit TestsFailed

Event Timeline

durin42 created this revision.Apr 25 2022, 5:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2022, 5:16 PM
durin42 requested review of this revision.Apr 25 2022, 5:16 PM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
durin42 updated this revision to Diff 425367.Apr 26 2022, 5:35 PM
durin42 edited the summary of this revision. (Show Details)
durin42 updated this revision to Diff 425499.Apr 27 2022, 6:05 AM
durin42 updated this revision to Diff 425842.Apr 28 2022, 10:34 AM
durin42 updated this revision to Diff 426090.Apr 29 2022, 9:29 AM
durin42 updated this revision to Diff 426098.Apr 29 2022, 9:35 AM
durin42 updated this revision to Diff 426410.May 2 2022, 7:04 AM
durin42 updated this revision to Diff 426735.May 3 2022, 8:47 AM
durin42 updated this revision to Diff 426777.May 3 2022, 10:45 AM
durin42 updated this revision to Diff 427091.May 4 2022, 11:37 AM
durin42 updated this revision to Diff 427756.May 6 2022, 2:40 PM
ormris removed a subscriber: ormris.May 16 2022, 10:58 AM
durin42 updated this revision to Diff 430162.May 17 2022, 12:28 PM
durin42 updated this revision to Diff 431700.May 24 2022, 9:45 AM
bogner added a subscriber: bogner.Jun 14 2022, 1:02 PM

This affects tests a bit more than I'd expect - I guess these are test issues where we weren't calling the builtin free for one reason or another. Would it be better to fix up the tests so that they do the right things without this change beforehand to make it obvious that this isn't changing behaviour in a weird way?

durin42 updated this revision to Diff 444096.Jul 12 2022, 3:47 PM

This affects tests a bit more than I'd expect - I guess these are test issues where we weren't calling the builtin free for one reason or another. Would it be better to fix up the tests so that they do the right things without this change beforehand to make it obvious that this isn't changing behaviour in a weird way?

Maybe. Do you have some exemplars in mind here that change in ways you don't expect? I've been looking at this patch so long it just seems obviously-the-way-it-is to me now...for good or for ill.

durin42 updated this revision to Diff 445899.Jul 19 2022, 11:57 AM
durin42 updated this revision to Diff 446191.Jul 20 2022, 9:56 AM
durin42 updated this revision to Diff 446204.Jul 20 2022, 10:35 AM