[llvm-commits] patch: mdnode .bc format change

Devang Patel devang.patel at gmail.com
Thu Jul 23 07:42:37 PDT 2009


On Wed, Jul 22, 2009 at 9:50 PM, Nick Lewycky<nicholas at mxc.ca> wrote:
> Devang Patel wrote:
>> On Tue, Jul 21, 2009 at 9:51 AM, Devang Patel<devang.patel at gmail.com> wrote:
>>> On Mon, Jul 20, 2009 at 10:33 PM, Nick Lewycky<nicholas at mxc.ca> wrote:
>>>
>>>>> I am moving in a direction where metadata is not derived from
>>>>> Constant. I will introduce new block in bitcode to hold metadata
>>>>> strings and nodes.
>>>> Okay. I assume this goes with removing the uniqueness property from MDNode?
>>> No.
>>
>> I may have misinterpreted your question. So may be, yes :)
>>
>> MDNode will continue to use FoldingSetNode to avoid creating duplicate
>> nodes. However when an MDNode element is RAUW'ed then it is possible
>> that resulting MDNode may match another existing MDNode.
>
> Okay, let me just check my understanding here.
>
> Let there be two values A and B. Let there be MDNodes !1 = { A, B }, !2
> = { B, B }, !3 = { A, 3 } and !4 = { B, 4 }.
>
> After I call A->rauw(B), we end up collapsing !1 and !2 into the same
> MDNode object, destroying one of them.

No. NDNodes are not Constants anymore.

> But, !3 and !4 will remain
> independent of each other, even though they're structurally equivalent.

Yes.

>
> Is that about right? Or did I misunderstand you entirely? :)
>
> Nick
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
-
Devang



More information about the llvm-commits mailing list