[LLVMdev] Metadata for MachineInstr

Zeng Bin ezengbin at gmail.com
Thu Apr 5 06:00:46 PDT 2012


Hi all,

Just a quick question about passing information all the way down to machine
code level. Metadata provides an excellent vehicle to pass extra ad-hoc
information along the compilation pipeline. However, If I understand
correctly, it seems that MachineInstr does not support metadata, by which I
mean metadata cannot be attached to MachineInstr's by now. Metadata can be
bundled with Instruction class instances. The metadata attached to
Instruction gets lost during code generation. Here is my question, is there
a way to pass information attached to Instruction even further down to
stages after code generation? NamedMetadata is a good example but it seems
that it cannot be attached to Instruction or MachineInstr if I understand
correctly. Is there something like DebugLoc which gets preserved all the
way but more general than DebugLoc?

Thank you in advance.
-Bin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120405/e8463413/attachment.html>


More information about the llvm-dev mailing list