[LLVMdev] Metadata for Argument, BasicBlock

Rotem, Nadav nadav.rotem at intel.com
Mon May 7 23:45:00 PDT 2012


If we were to implement the #unroll pragma, we would want to add metadata to loop headers.  But, it's not a big deal since we can simply add this metadata to block terminators. 

-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Dan Gohman
Sent: Tuesday, May 08, 2012 00:58
To: Ralf Karrenberg
Cc: llvmdev at cs.uiuc.edu List
Subject: Re: [LLVMdev] Metadata for Argument, BasicBlock


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

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-dev mailing list