Skip to content

Commit

Permalink
Merge branch 'main' into vksnk/better-loop-carry
Browse files Browse the repository at this point in the history
  • Loading branch information
vksnk committed Jan 3, 2024
2 parents b71d889 + d2da007 commit 7cfc0b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CodeGen_LLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,11 @@ void CodeGen_LLVM::optimize_module() {
}

if (tm) {
#if LLVM_VERSION >= 180
tm->registerPassBuilderCallbacks(pb, /*PopulateClassToPassNames=*/false);
#else
tm->registerPassBuilderCallbacks(pb);
#endif
}

mpm = pb.buildPerModuleDefaultPipeline(level, debug_pass_manager);
Expand Down
4 changes: 4 additions & 0 deletions src/CodeGen_PTX_Dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,11 @@ vector<char> CodeGen_PTX_Dev::compile_to_src() {
using OptimizationLevel = llvm::OptimizationLevel;
OptimizationLevel level = OptimizationLevel::O3;

#if LLVM_VERSION >= 180
target_machine->registerPassBuilderCallbacks(pb, /*PopulateClassToPassNames=*/false);
#else
target_machine->registerPassBuilderCallbacks(pb);
#endif

mpm = pb.buildPerModuleDefaultPipeline(level, debug_pass_manager);
mpm.run(*module, mam);
Expand Down

0 comments on commit 7cfc0b0

Please sign in to comment.