This is an archive of the discontinued LLVM Phabricator instance.

[funcattrs] Infer nosync from readnone and non-convergent
ClosedPublic

Authored by reames on Apr 1 2021, 10:13 AM.

Details

Summary

This implements the most basic possible nosync inference. The choice of inference rule is taken from the comments in attributor and the discussion on the review of the change which introduced the nosync attribute (0626367202c).

This is deliberately minimal. As noted in code comments, I do plan to add a more robust inference which actually scans the function IR directly, but a) I need to do some refactoring of the attributor code to use common interfaces, and b) I wanted to get something in. I also wanted to minimize the "interesting" analysis discussion since that's time intensive.

Context: This combines with existing nofree attribute inference to help prove dereferenceability in the ongoing deref-at-point semantics work.

Diff Detail

Event Timeline

reames created this revision.Apr 1 2021, 10:13 AM
reames requested review of this revision.Apr 1 2021, 10:13 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added subscribers: bbn, wdng. · View Herald Transcript
jdoerfert accepted this revision.Apr 1 2021, 10:46 AM

Every time I ask myself why we don't create a lightweight Attributor pass and run it by default instead :(

LGTM.

This revision is now accepted and ready to land.Apr 1 2021, 10:46 AM
This revision was landed with ongoing or failed builds.Apr 1 2021, 11:37 AM
This revision was automatically updated to reflect the committed changes.