[PATCH] D94633: [FunctionAttrs] Infer willreturn for functions without loops

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 13:48:16 PST 2021


nikic created this revision.
nikic added reviewers: fhahn, jdoerfert.
Herald added subscribers: kerbowa, nhaehnle, jvesely.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If a function doesn't contain loops and does not call non-willreturn functions, then it is willreturn. Handling of the loop case is left as an exercise to the reader ;)

I think this should give us enough inference to move forward with D94106 <https://reviews.llvm.org/D94106>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94633

Files:
  lib/Transforms/IPO/FunctionAttrs.cpp
  test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
  test/CodeGen/AMDGPU/inline-attr.ll
  test/CodeGenOpenCL/convergent.cl
  test/Transforms/FunctionAttrs/atomic.ll
  test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll
  test/Transforms/FunctionAttrs/nofree.ll
  test/Transforms/FunctionAttrs/optnone.ll
  test/Transforms/FunctionAttrs/willreturn.ll
  test/Transforms/FunctionAttrs/writeonly.ll
  test/Transforms/InferFunctionAttrs/norecurse_debug.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94633.316507.patch
Type: text/x-patch
Size: 9911 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210113/93678a52/attachment.bin>


More information about the llvm-commits mailing list