[LLVMdev] [RFC] "noclone" function attribute
clattner at apple.com
Mon Dec 3 08:08:28 PST 2012
On Dec 2, 2012, at 11:17 PM, Chandler Carruth <chandlerc at google.com> wrote:
> 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....
Good points, it seems like the right API would be to have a CodeMetrics objects that instructions can be "pushed" into during an exterior walk, and then the cost could be queried after each instruction is added.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev