Generating LLVM Bitcode


Is there anything like translateModuleToLLVMIR, but for generating LLVM Bitcode? I know that I can run createBitcodeWriterPass (or BitcodeWriterPass) on the output from translateModuleToLLVMIR, but first I wanted to make sure that I’m not missing something obvious in MLIR.

Thank you!

No. Once you have LLVM IR, you are supposed to use LLVM functionality.

1 Like

Makes sense, thanks for confirming!