[LLVMdev] recognizing DTORs and vptr updates in LLVM.

Chris Lattner clattner at apple.com
Mon Mar 19 20:54:22 PDT 2012


On Mar 19, 2012, at 5:13 PM, Kostya Serebryany wrote:
>> However, this does not sound right. 
>> What would be the right way to pass this information from clang to LLVM?
>> Will using metadata for this purpose be a right solution? 
>> (insn-level metadata for vptr store and module-level metadata for DTORs)
> 
> Using instruction level metadata for this would be appropriate.  However, I also don't understand why a race on this is truly benign.  I'm also concerned that you're adding even more knobs to clang and IR for special case situations.
> 
> As for "more knobs", Chandler mentioned to me recently that being able to identify vptr accesses will help 
> virtual function call inlining, so we may still need this knob for other purposes. 

Right, but this would have to be designed properly.  If someone wants to put forward a concrete use case and a design that would enable virtual call inlining that is also useful for tsan, that would certainly be interesting.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120319/35d04be0/attachment.html>


More information about the llvm-dev mailing list