Skip to content

Commit

Permalink
Skip cloned funciton serialisation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel-Durov committed Sep 28, 2024
1 parent f4ab756 commit d73b87c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion llvm/lib/YkIR/YkIRWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "llvm/MC/MCStreamer.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Transforms/Yk/ControlPoint.h"
#include "llvm/Transforms/Yk/ModuleClone.h"

using namespace llvm;
using namespace std;
Expand Down Expand Up @@ -1742,7 +1743,10 @@ class YkIRWriter {
OutStreamer.emitSizeT(M.size());
// funcs:
for (llvm::Function &F : M) {
serialiseFunc(F);
// Skip cloned functions
if (!StringRef(F.getName()).startswith(YK_CLONE_PREFIX)) {
serialiseFunc(F);
}
}

// num_constants:
Expand Down

0 comments on commit d73b87c

Please sign in to comment.