[LLVMdev] [RFC] "noclone" function attribute

Chris Lattner clattner at apple.com
Sun Dec 2 22:11:59 PST 2012


On Dec 1, 2012, at 11:49 PM, "Kuperstein, Michael M" <michael.m.kuperstein at intel.com> wrote:

> I definitely support this.
> 
> In fact we were about to send a very similar proposal. The main difference I can see between this proposal and ours was that we named the attribute "noduplicate". 
> I graciously defer to James on the bikeshade color issue.

Yes, this sort of functionality is useful.  A few requests though:
1) please name it "noduplicate".  "cloning" has other naming implications in llvm related to function bodies, but calls to a noduplicate function should not be duplicated in any way (e.g. tail duplication, loop unrolling, etc).
2) please have the llvm/Analysis/CodeMetrics.h code consider them to be unduplicatable (generalizing the containsIndirectBr bit).  
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.

-Chris




More information about the llvm-dev mailing list