Displaying 5 results from an estimated 5 matches for "my_special_type_info".
2010 Sep 29
3
[LLVMdev] Associating types directly with debug metadata?
...tadata to match metadata with type.
>
> !11 = metadata !{i32 524307, metadata !1, metadata !"T", metadata !1, i32 2, i64 32, i64 32, i64 0, i32 0, null, metadata !12, i32 0, null} ; [ DW_TAG_structure_type ]
>
> !21 = metadata !{ metadata !11, %struct.T %z}
>
> !llvm.my_special_type_info = !{!21}
Ok, that approach should work. Though we want to associate the type, not some variable with the type, i.e. something like
!21 = metadata !{ %struct.T, metadata !11 }
But I don't know if that would be valid syntax...
> Yes. BTW, Dan Gohman is working on TBAA. He is also workin...
2010 Sep 30
0
[LLVMdev] Associating types directly with debug metadata?
...with type.
>>
>> !11 = metadata !{i32 524307, metadata !1, metadata !"T", metadata !1, i32 2, i64 32, i64 32, i64 0, i32 0, null, metadata !12, i32 0, null} ; [ DW_TAG_structure_type ]
>>
>> !21 = metadata !{ metadata !11, %struct.T %z}
>>
>> !llvm.my_special_type_info = !{!21}
>
> Ok, that approach should work. Though we want to associate the type, not some variable with the type, i.e. something like
>
> !21 = metadata !{ %struct.T, metadata !11 }
>
> But I don't know if that would be valid syntax...
I thought about that more, and I...
2010 Sep 29
0
[LLVMdev] Associating types directly with debug metadata?
...d you can use pair in named metadata to match metadata with type.
!11 = metadata !{i32 524307, metadata !1, metadata !"T", metadata !1, i32 2, i64 32, i64 32, i64 0, i32 0, null, metadata !12, i32 0, null} ; [ DW_TAG_structure_type ]
!21 = metadata !{ metadata !11, %struct.T %z}
!llvm.my_special_type_info = !{!21}
>
> The next step apparently would be to support to LLParser to read in such associations, and to AsmPrinter to print it out.
Yes.
> But how about the bitcode? Would this require a new LLVMBitCode?
You need to modify bitcode writer/reader.
>
> With that, would LLV...
2010 Sep 29
3
[LLVMdev] Associating types directly with debug metadata?
We would need to access the LLVM debug metadata type information directly from LLVM types. It looks like the current clang and llvm-gcc don't support such an association, nor appears the LLVM itself do. (We are tracking TOT, but only once a month or so.)
In terms of LLVM IR, apparantly this would simply mean optionally adding another metadata value to each type. For example, let us have a
2010 Sep 30
3
[LLVMdev] Associating types directly with debug metadata?
...>>> !11 = metadata !{i32 524307, metadata !1, metadata !"T", metadata !1, i32 2, i64 32, i64 32, i64 0, i32 0, null, metadata !12, i32 0, null} ; [ DW_TAG_structure_type ]
>>>
>>> !21 = metadata !{ metadata !11, %struct.T %z}
>>>
>>> !llvm.my_special_type_info = !{!21}
>>
>> Ok, that approach should work. Though we want to associate the type, not some variable with the type, i.e. something like
>>
>> !21 = metadata !{ %struct.T, metadata !11 }
>>
>> But I don't know if that would be valid syntax...
>
>...