How to send LLVM IR to a code generator backend


I have implemented a very simple code generator backend, that I would
like to test. I currently have a Module object containing the LLVM IR
that I would like to turn into machine code, but I'm not quite sure how
to pass it off to the backend to do the instruction selection and begin
the process of code generation. How do I go about doing this?


You can register your backend with LLC and use the LLC tool to convert from IR to ISA.

More information can be found here: