[LLVMdev] [RFC] "noclone" function attribute

Chandler Carruth chandlerc at google.com
Sun Dec 2 23:17:58 PST 2012

On Sun, Dec 2, 2012 at 10:27 PM, Nadav Rotem <nrotem at apple.com> wrote:

> On Dec 2, 2012, at 10:11 PM, Chris Lattner <clattner at apple.com> wrote:
> 3) Please change random parts of the compiler to use CodeMetrics, instead
> of scattering random checks for this attribute throughout the code.
>  Anything duplicating code and not using CodeMetrics is just plain
> incorrect.
> One problem that we may run into when using CodeMetrics is compile time.
> In many cases we are looking for one particular trait and can exit as soon
> as we find it without having to scan the entire basic block or function.
>  For example, the jump threading pass stops scanning additional
> instructions as soon as it passes the cost threshold.

The inline cost analysis has similar problems, but compounded: we need to
share the walk of instructions between cost computation and checking for
incompatible patterns for inlining.

A long standing todo on my list has been to factor code metrics into an API
that inline cost analysis could actually use without interfering with the
instruction visit pattern of that cost analysis. I haven't had time to
really make progress, in part because I don't (yet) have any particularly
good ideas....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121202/e44fbe2e/attachment.html>

More information about the llvm-dev mailing list