What is LLVM Intermediate representation?

帅比萌擦擦* 提交于 2019-12-01 03:42:48

I'm not familiar with a single, strict definition of what differentiates one level of IR from another, but from what I know it would fall under the MIR category.

  • It has SSA form and doesn't have explicit registers, so I would definitely not categorize it as low-level.
  • It doesn't have named subelement reference or advanced flow-control constructs, so it wouldn't really fit into HIR, either.

In any case, LLVM IR is typically stored on disk in either text files with .ll extension or in binary files with .bc extension. Conversion between the two is trivial, and you can just use llvm-dis for bc -> ll and llvm-as for ll -> bc. The binary format is more memory-efficient, while the textual format is human-readable.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!