Skip to content

Commit

Permalink
Merge pull request #119 from nmdis1999/main
Browse files Browse the repository at this point in the history
Resurrecting Stackmap insertion change
  • Loading branch information
ptersilie authored Mar 12, 2024
2 parents d68ef90 + 1d108f6 commit b13bfe1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions llvm/lib/Transforms/Yk/StackMaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "llvm/IR/Verifier.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Yk/ControlPoint.h"
#include "llvm/Transforms/Yk/LivenessAnalysis.h"

#include <map>

#define DEBUG_TYPE "yk-stackmaps"
Expand Down Expand Up @@ -60,8 +60,15 @@ class YkStackmaps : public ModulePass {
// We don't need to insert stackmaps after intrinsics. But since we
// can't tell if an indirect call is an intrinsic at compile time,
// emit a stackmap in those cases too.
if (!CI.isIndirectCall() && CI.getCalledFunction()->isIntrinsic())

if (!CI.isIndirectCall() &&
(CI.getCalledFunction()->isIntrinsic() ||
(CI.getCalledFunction()->isDeclaration() &&
(!CI.getCalledFunction()->getName().startswith(
"__yk_promote") &&
CI.getCalledFunction()->getName() != YK_NEW_CONTROL_POINT))))
continue;

SMCalls.insert({&I, LA.getLiveVarsBefore(&I)});
} else if ((isa<BranchInst>(I) &&
cast<BranchInst>(I).isConditional()) ||
Expand Down

0 comments on commit b13bfe1

Please sign in to comment.