If your "other tool" is not a pass in itself, then yes, I think metadata is the best approach - keeps everything in the IR, easy to identify by eye, simple to manually add for testing, and - perhaps most importantly - does not collide with anything else, as long as you don't reuse existing metadata kinds. I appreciate your help or some material that could help me understand this. I tried reading up a lot of discussions in forums and the llvm doxygen docs but I did not get a clear and complete answer to all my questions. What is the relevance of context to metadata? What Context should I use in the setMedata(), if I want to attach the metadata to an instruction inside a function. I want to create a MDString, attach it to my MDNode and then call setMetadata() with an instruction. I am not sure which MDKind should my data be of. Which variant of setMetadata() is the right one to use. I plan to use the setMedata() function to attach it to an instruction. ![]() If metadata is the right way to go here, I need some help creating a metadata node. ![]() So is metadata a good idea ? I intend to store strings as metadata with some instructions. I expect the information I store as metadata to feed into another tool which works on the LLVM IR. I intend to store this information for use by another tool in a tool chain. ![]() I am trying to add metadata to instructions in LLVM after a transformation pass (with the C++ API).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |