This is an archive of the discontinued LLVM Phabricator instance.

[-Wcalled-once-parameter] Let escapes overwrite MaybeCalled states
ClosedPublic

Authored by vsavchenko on Mar 15 2021, 1:03 AM.

Details

Summary

This commit makes escapes symmetrical, meaning that having escape
before and after the branching, where parameter is not called on
one of the paths, will have the same effect.

Diff Detail

Event Timeline

vsavchenko created this revision.Mar 15 2021, 1:03 AM
vsavchenko requested review of this revision.Mar 15 2021, 1:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2021, 1:03 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Unify the way we deal with escapes

NoQ accepted this revision.Mar 16 2021, 12:47 PM

LGTM! Do any of the high-level comments at the beginning of the file need to be updated to reflect this change?

This revision is now accepted and ready to land.Mar 16 2021, 12:47 PM
In D98622#2630012, @NoQ wrote:

LGTM! Do any of the high-level comments at the beginning of the file need to be updated to reflect this change?

No, they don't. This commit doesn't affect the join semantics (the main focus of those). It changes semantics of the transfer function that probably also should be described somewhere in one part of the code.