Skip to content

Commit

Permalink
Manually call buildO0DefaultPipeline for the new pass manager
Browse files Browse the repository at this point in the history
Revert this commit once we have https://reviews.llvm.org/D146200
  • Loading branch information
devajithvs authored and jenkins committed Jan 30, 2024
1 parent c444493 commit 1b5103e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Interpreter/BackendPasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,12 @@ void BackendPasses::CreatePasses(int OptLevel, llvm::ModulePassManager& MPM,
// Use the default pass pipeline. We also have to map our optimization
// levels into one of the distinct levels used to configure the pipeline.
OptimizationLevel Level = mapToLevel(m_CGOpts);
MPM.addPass(PB.buildPerModuleDefaultPipeline(Level));
if (m_CGOpts.OptimizationLevel == 0) {
// TODO: Remove this after https://reviews.llvm.org/D146200
MPM.addPass(PB.buildO0DefaultPipeline(Level));
} else {
MPM.addPass(PB.buildPerModuleDefaultPipeline(Level));
}
}

// The function __cuda_module_ctor and __cuda_module_dtor will just generated,
Expand Down

0 comments on commit 1b5103e

Please sign in to comment.