Skip to content

Commit

Permalink
Marks header function implementations as inline
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBolitho committed Nov 11, 2024
1 parent f5efc35 commit 4b18c47
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions enzyme/tools/enzyme-tblgen/blasDeclUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include "datastructures.h"

void emit_attributeBLASCaller(ArrayRef<TGPattern> blasPatterns,
raw_ostream &os) {
inline void emit_attributeBLASCaller(ArrayRef<TGPattern> blasPatterns,
raw_ostream &os) {
os << "void attributeBLAS(BlasInfo blas, llvm::Function *F) { \n";
os << " if (!F->empty())\n";
os << " return;\n";
Expand All @@ -18,7 +18,7 @@ void emit_attributeBLASCaller(ArrayRef<TGPattern> blasPatterns,
os << "} \n";
}

void emit_attributeBLAS(const TGPattern &pattern, raw_ostream &os) {
inline void emit_attributeBLAS(const TGPattern &pattern, raw_ostream &os) {
auto name = pattern.getName();
bool lv23 = pattern.isBLASLevel2or3();
os << "llvm::Constant* attribute_" << name
Expand Down Expand Up @@ -199,7 +199,7 @@ void emit_attributeBLAS(const TGPattern &pattern, raw_ostream &os) {
os << "}\n";
}

void emitBlasDeclUpdater(const RecordKeeper &RK, raw_ostream &os) {
inline void emitBlasDeclUpdater(const RecordKeeper &RK, raw_ostream &os) {
emitSourceFileHeader("Rewriters", os);
const auto &blasPatterns = RK.getAllDerivedDefinitions("CallBlasPattern");

Expand Down
4 changes: 2 additions & 2 deletions enzyme/tools/enzyme-tblgen/blasDiffUseUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "enzyme-tblgen.h"
#include "llvm/Support/raw_ostream.h"

void emit_BLASDiffUse(TGPattern &pattern, llvm::raw_ostream &os) {
inline void emit_BLASDiffUse(TGPattern &pattern, llvm::raw_ostream &os) {
auto typeMap = pattern.getArgTypeMap();
auto argUsers = pattern.getArgUsers();
bool lv23 = pattern.isBLASLevel2or3();
Expand Down Expand Up @@ -142,7 +142,7 @@ void emit_BLASDiffUse(TGPattern &pattern, llvm::raw_ostream &os) {
os << "}\n";
}

void emitBlasDiffUse(const RecordKeeper &RK, llvm::raw_ostream &os) {
inline void emitBlasDiffUse(const RecordKeeper &RK, llvm::raw_ostream &os) {
emitSourceFileHeader("Rewriters", os);
const auto &blasPatterns = RK.getAllDerivedDefinitions("CallBlasPattern");

Expand Down
6 changes: 3 additions & 3 deletions enzyme/tools/enzyme-tblgen/blasTAUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "datastructures.h"

void emit_BLASTypes(raw_ostream &os) {
inline void emit_BLASTypes(raw_ostream &os) {
os << "const bool byRef = blas.prefix == \"\" || blas.prefix == "
"\"cublas_\";\n";
os << "const bool byRefFloat = byRef || blas.prefix == "
Expand Down Expand Up @@ -68,7 +68,7 @@ void emit_BLASTypes(raw_ostream &os) {

// cblas lv23 => layout
// cublas => always handle
void emit_BLASTA(TGPattern &pattern, raw_ostream &os) {
inline void emit_BLASTA(TGPattern &pattern, raw_ostream &os) {
auto name = pattern.getName();
bool lv23 = pattern.isBLASLevel2or3();

Expand Down Expand Up @@ -183,7 +183,7 @@ void emit_BLASTA(TGPattern &pattern, raw_ostream &os) {
os << "}\n";
}

void emitBlasTAUpdater(const RecordKeeper &RK, raw_ostream &os) {
inline void emitBlasTAUpdater(const RecordKeeper &RK, raw_ostream &os) {
emitSourceFileHeader("Rewriters", os);
const auto &blasPatterns = RK.getAllDerivedDefinitions("CallBlasPattern");

Expand Down

0 comments on commit 4b18c47

Please sign in to comment.