Is it possible to translate an assembly language to LLVM IR, optimize it and then recompile it to a different architecture?

倾然丶 夕夏残阳落幕 提交于 2019-12-05 00:54:05
Richard Pennington

This is a similar question: Recompile a x86 code with LLVM to some faster one x86

The answer is that LLVM can't do it directly, but could be used as part of a tool that does.

shining

It is possible.

But you need to develop some code base the LLVM to implement the process translating the assembly language to LLVM IR. Then the LLVM can help you to optimize and generator for new architecture.

So, the point is you need to develop the translator which can translate the assembly language to LLVM IR. I have seen someone already do that, you can search on the website.

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