This is an archive of the discontinued LLVM Phabricator instance.

[BasicAA] Ignore CanBeFreed in minimal extent reasoning
ClosedPublic

Authored by nikic on Oct 3 2021, 8:48 AM.

Details

Summary

When determining NoAlias based on object size and dereferenceability information, we can ignore frees for the same reason we can ignore possible null pointers (if null is not a valid pointer): Actually accessing the null pointer / freed pointer would be immediate UB, and AA results are only valid under the assumption of an access.

This addresses a minor regression from D110745.

Diff Detail

Event Timeline

nikic created this revision.Oct 3 2021, 8:48 AM
nikic requested review of this revision.Oct 3 2021, 8:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2021, 8:48 AM
nlopes accepted this revision.Oct 3 2021, 11:13 AM

good catch!
This function is only used to heck if one of the accesses is larger than the 2nd object. It doesn't matter whether it is live or not.

This revision is now accepted and ready to land.Oct 3 2021, 11:13 AM
This revision was automatically updated to reflect the committed changes.