[llvm] r177619 - Move library call prototype attribute inference to functionattrs

Duncan Sands baldrick at free.fr
Thu Mar 21 08:48:10 PDT 2013


Hi Meador,

On 21/03/13 01:55, Meador Inge wrote:
> Author: meadori
> Date: Wed Mar 20 19:55:59 2013
> New Revision: 177619
>
> URL: http://llvm.org/viewvc/llvm-project?rev=177619&view=rev
> Log:
> Move library call prototype attribute inference to functionattrs
...
> -//===- FunctionAttrs.cpp - Pass which marks functions readnone or readonly ===//
> +//===- FunctionAttrs.cpp - Pass which marks functions attributes ----------===//
>   //
>   //                     The LLVM Compiler Infrastructure
>   //
> @@ -62,14 +66,63 @@ namespace {
>       // AddNoAliasAttrs - Deduce noalias attributes for the SCC.
>       bool AddNoAliasAttrs(const CallGraphSCC &SCC);
>
> +    // Utility methods used by inferPrototypeAttributes to add attributes
> +    // and maintain annotation statistics.
> +
> +    void setDoesNotAccessMemory(Function &F) {
> +      if (!F.doesNotAccessMemory()) {
> +	F.setDoesNotAccessMemory();
> +	++NumAnnotated;
> +      }
> +    }

maybe some of these utilities can be used by the existing function attributes
code, and not just by the new code you added?

Ciao, Duncan.



More information about the llvm-commits mailing list