[llvm-commits] [llvm] r91497 - in /llvm/trunk: include/llvm/Metadata.h lib/VMCore/Metadata.cpp

Devang Patel dpatel at apple.com
Mon Jan 4 08:33:43 PST 2010


On Dec 18, 2009, at 12:15 PM, Victor Hernandez wrote:

>
> On Dec 17, 2009, at 12:06 AM, Chris Lattner wrote:
>
>> On Dec 16, 2009, at 10:56 AM, Devang Patel wrote:
>>
>>>>>
>>>>> Is this new field copied by MetadataContextImpl::copyMD?
>>>>
>>>> The semantic is that if an MDNode is created function-local, then  
>>>> it will continue to be function-local even if its operands are  
>>>> modified to no longer refer to any function-specific IR.
>>>
>>> That'll break MDNode unique-ness.
>>
>> We don't guarantee MDNode uniqueness, we just endeavor to preserve  
>> it when it isn't "too hard".
>
> Devang, you were concerned that 2 MDNodes with identical operands  
> would not be the same if one is function-local and the other is not  
> (can happen if an originally function-local MDNode has its operands  
> modified to match those of a pre-existing non-function-local  
> MDNode).  Are there any issues with making these MDNodes be distinct?

Again, as Dan asked earlier, what's the use ? IMO, verifier needs are  
not at all "too hard" in this case. As Chris agreed, we can have one  
utility routine to satisfy verifier's needs. I do not see any need to  
1) add Function * in MDNode, 2) or add a bit in MDNode, 3) or extend  
MDNode class hierarchy, just for verifier. Let's focus on completing  
@llvm.dbg.var support and we can revisit this when there is a real need.

-
Devan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100104/4a60ee59/attachment.html>


More information about the llvm-commits mailing list