Skip to content

Commit

Permalink
Add will-return attribute for GPU compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
arshajii committed Nov 10, 2023
1 parent effd412 commit 063ef3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions codon/cir/llvm/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,10 @@ void moduleToPTX(llvm::Module *M, const std::string &filename,
remapFunctions(M);

// Strip debug info and remove noinline from functions (added in debug mode).
// Also, tell LLVM that all functions will return.
for (auto &F : *M) {
F.removeFnAttr(llvm::Attribute::AttrKind::NoInline);
F.setWillReturn();
}
llvm::StripDebugInfo(*M);

Expand Down

0 comments on commit 063ef3a

Please sign in to comment.