I'm wondering if anyone is working on a machine code -> LLVM bitcode disassembler? Obviously, there won't be a one-to-one correspondence but it seems like you should be able to get close. There's always inline asm for the remaining fragments.
So is there such a thing?
As an ongoing personal research project, I have something like this. I actually learned of LLVM as part of some research I was doing on this project. It is a quite complicated though, each assembly language instruction expands to a number of SSA instructions, as each flag/register affected becomes a separate instruction, every register used in the method has phi functions in every basic block, the initial generation produces much more code that the original assembly language which then need to have certain optimization passes to weed out unneeded effects. reconstructing local variables from stack usage, and picking out method inputs/outputs that are real as opposed to just being saved and restored is tricky too.