[PATCH] D14228: [FunctionAttrs] Identify norecurse functions

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 05:06:08 PST 2015


jmolloy created this revision.
jmolloy added reviewers: dexonsmith, manmanren, joker.eph.
jmolloy added a subscriber: llvm-commits.
jmolloy set the repository for this revision to rL LLVM.

A function can be marked as norecurse if:
  * The SCC to which it belongs has cardinality 1.
  * It does not call any non-norecurse function. This includes self-recursion.

We can simply build up norecurse attributes in the existing SCC pass.

Repository:
  rL LLVM

http://reviews.llvm.org/D14228

Files:
  lib/Transforms/IPO/FunctionAttrs.cpp
  test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll
  test/Transforms/FunctionAttrs/2010-10-30-volatile.ll
  test/Transforms/FunctionAttrs/atomic.ll
  test/Transforms/FunctionAttrs/norecurse.ll
  test/Transforms/FunctionAttrs/optnone.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14228.38894.patch
Type: text/x-patch
Size: 4513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151102/68d87ac3/attachment.bin>


More information about the llvm-commits mailing list