[LLVMdev] Is it possible to map an LLVM instruction to x86 assembly instructions?

Eli Friedman eli.friedman at gmail.com
Mon Oct 25 13:54:30 PDT 2010


On Mon, Oct 25, 2010 at 12:39 PM, Heming Cui <hc2428 at columbia.edu> wrote:
> Dear folks,
>     If I want to setup a mapping between an LLVM instruction and the x86
> assembly instructions it generates, is this possible?
>     Or, an equavalent question is, when LLVM is emitting assebmly
> instructions, will it transform a set of LLVM instructions to a set of
> assembly instructions, or transform each LLVM instruction to assembly
> instructions independently?

Essentially, it's from a set to a set; if you're compiling without
optimizations, the correlation will likely be close, but not exact.
With optimizations, the end result might not be particularly close.
You can come up with an approximation using debug information, though.

-Eli




More information about the llvm-dev mailing list