[llvm-dev] Can I dump LLVM IR after each pass in Clang BackendUtil.cpp

Zhengyang Liu via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 12 05:38:33 PDT 2016


Dear llvm-dev,

I am trying to debug some passes , these passes are added to 
legacy::PassManager(MPM) in Clang's lib/CodeGen/BackendUtil.cpp  :


//******
void EmitAssemblyHelper::CreatePasses() {
//******
   if (CodeGenOpts.MemSafety) {
     //
     // Add passes that record information about run-time checks.
     //
     MPM->add (createCommonMSCInfoPass());
     MPM->add (createSAFECodeMSCInfoPass());
//******

Could I dump the output LLVM IR after each pass in PassManager MPM?

Best regards,
Zhengyang.


More information about the llvm-dev mailing list