[LLVMdev] Metadata for Argument, BasicBlock
Dan Gohman
gohman at apple.com
Mon May 7 14:58:00 PDT 2012
On May 7, 2012, at 7:21 AM, Ralf Karrenberg <Chareos at gmx.de> wrote:
> Hi Duncan,
>
> On 5/6/12 6:12 PM, Duncan Sands wrote:
>> Hi Ralf,
>>
>>> Is there a clean way to attach metadata nodes to Arguments and/or
>>> BasicBlocks?
>>
>> not at the moment. Feel free to work on adding this functionality!
>
> I am looking into that now.
> I decided to temporarily go for the following syntax for BasicBlock
> metadata (subject to discussion):
>
> entry:
> !property_1 !0, !property_2 !1
> %x = fadd float %a, %b
>
> It seems that I have to touch lots of files for this:
> BasicBlock.h/.cpp, Metadata.cpp, LLParser.cpp, AsmParser, AsmWriter,
> BitcodeReader.cpp, BitcodeWriter.cpp so far.
> I basically went and duplicated code that handles metadata attached to
> instructions.
What kind of things might basic block metadata be used for?
Dan
More information about the llvm-dev
mailing list