[PATCH] D99749: [funcattrs] Infer nosync from readnone and non-convergent

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 1 10:13:47 PDT 2021


reames created this revision.
reames added reviewers: jdoerfert, sstefan1, nhaehnle, arsenm, jfb.
Herald added subscribers: okura, kuter, dantrushin, uenoku, hiraditya, mcrosier.
Herald added a reviewer: bollu.
Herald added a reviewer: uenoku.
reames requested review of this revision.
Herald added subscribers: bbn, wdng.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99749

Files:
  llvm/lib/Transforms/IPO/FunctionAttrs.cpp
  llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
  llvm/test/Other/cgscc-devirt-iteration.ll
  llvm/test/Other/cgscc-iterate-function-mutation.ll
  llvm/test/Other/cgscc-observe-devirt.ll
  llvm/test/Transforms/FunctionAttrs/atomic.ll
  llvm/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll
  llvm/test/Transforms/FunctionAttrs/nofree-attributor.ll
  llvm/test/Transforms/FunctionAttrs/norecurse.ll
  llvm/test/Transforms/FunctionAttrs/nosync.ll
  llvm/test/Transforms/FunctionAttrs/nounwind.ll
  llvm/test/Transforms/FunctionAttrs/optnone.ll
  llvm/test/Transforms/Inline/cgscc-update.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99749.334739.patch
Type: text/x-patch
Size: 13637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210401/b9eb0b8a/attachment.bin>


More information about the llvm-commits mailing list