How to send LLVM IR to a code generator backend

Hi,

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?

Thanks,
Tom

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

More information can be found here:
http://llvm.org/docs/WritingAnLLVMBackend.html#TargetRegistration
http://llvm.org/cmds/llc.html