Any idea on translate x86 assembly to LLVM IR?

I’am now considering converting x86 machine assembly into LLVM IR, does anyone know about any existing project or resource related to this area?
Any difficulities or any ideas on this?

thanks for your replies in advance.

I'am now considering converting x86 machine assembly into LLVM
IR, does anyone know about any existing project or resource
related to this area? Any difficulities or any ideas on this?

There is a idea floating around that LLVM and QEMU could be
married. QEMU has sort-of-a-disassembler, where they generate
little pieces of code and later let that code execute (it's
actually a bit different, but hey, use the source). The idea was
to replace that part with an LLVM IR generation. Then you can
use standard LLVM optimization passes on this and/or run this
code via JIT.

Anyway, the disassembler-part of QEMU is easy to rip out, for me
it was easier than, say, the libbfd based disassemblers, which
are highly optimized to produce human readable strings.

This is a hard problem. Machine assembly is (mostly) untyped. You also have to reconstruct CFG, translate it back to SSA form. Not to mention how do you translate instructions where there is no equivalent llvm instruction.

Evan