[PATCH] D14227: Add a new attribute: norecurse

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 08:41:06 PST 2015


On Mon, Nov 2, 2015 at 5:03 AM, James Molloy via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> jmolloy created this revision.
> jmolloy added reviewers: manmanren, dexonsmith, joker.eph.
> jmolloy added a subscriber: llvm-commits.
> jmolloy set the repository for this revision to rL LLVM.
>
> This attribute allows the compiler to assume that the function never
> recurses into itself, either directly or indirectly (transitively). This
> can be used among other things to demote global variables to locals.
>

Where would this attribute generally come from? Is it expected that this
would be exposed as a source language attribute? (any prior art there?)
Otherwise wouldn't this be an LLVM analysis, rather than a first-class IR
feature?


>
> The norecurse attribute indicates that the function does not call itself
> either directly or indirectly down any possible call path.
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D14227
>
> Files:
>   docs/LangRef.rst
>   include/llvm/Bitcode/LLVMBitCodes.h
>   include/llvm/IR/Attributes.h
>   include/llvm/IR/Function.h
>   lib/AsmParser/LLLexer.cpp
>   lib/AsmParser/LLParser.cpp
>   lib/AsmParser/LLToken.h
>   lib/Bitcode/Reader/BitcodeReader.cpp
>   lib/Bitcode/Writer/BitcodeWriter.cpp
>   lib/IR/Attributes.cpp
>   lib/IR/Verifier.cpp
>   test/Bindings/llvm-c/invalid-bitcode.test
>   test/Bitcode/attributes.ll
>   test/Bitcode/compatibility.ll
>   test/Bitcode/invalid.ll
>   test/LTO/X86/invalid.ll
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151102/fdd393b9/attachment.html>


More information about the llvm-commits mailing list