Do metadata exist on Machine Code level in LLVM?

2019-08-02 02:36发布

问题:

I added my new custom attribute and I can see it on the memory operands of LLVM IR, is there any way to do so on the Machine Code level as well?

回答1:

No, there isn't.

Metadata is an LLVM-IR thing. It can be consumed by passes and then used to generate something on the machine code level, but you have to do that yourself (or add metadata which is already used by some pass, such as debug information).