[llvm-commits] metadata.h/cpp review stuff

Chris Lattner clattner at apple.com
Tue Oct 20 21:10:03 PDT 2009


On Oct 20, 2009, at 3:10 PM, Devang Patel wrote:

>>>
>>> Metadata used by another metadata is counted as regular uses.  
>>> Metadata
>>> used by non-metadata values is not a normal use (it is invisible to
>>> the non-metadata value). This is why the hierarchy is based on User
>>> and operand list is only counting metadata uses.
>>
>> Ok, I see now that you're doing this.  But why? :)  What capability  
>> does this provide?  Is there another way to get it?  This  
>> capability costs a lot of complexity, memory and compile time.
>
>
> This may be useful to reduce memory pressure by allowing metadata  
> user to delete MDNode and its MDNode users. After stumbling couple  
> of times to get this, I am also wondering whether this is worth it  
> or not or is this the right approach.
>
> MDNodes are uniqued, just like Constant. However Constants become  
> zoombie if its use count is reduced to zero. This may be too  
> expensive for metadata because of possibility of high volume of  
> metadata in the IR due to various reasons.

I'm not convinced :) , what "various reasons" would cause this?   
Again, we have a lot of complexity to support a use case that isn't  
clear.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091020/5e25549e/attachment.html>


More information about the llvm-commits mailing list