Skip to content

Commit

Permalink
More accurate live variables at the control point.
Browse files Browse the repository at this point in the history
Variables that die immediately after the control point are not live and thus
don't need to be tracked and passed into traces. This reduces the number of
live variables at the control point by one in some tests.
  • Loading branch information
ptersilie committed Jan 8, 2025
1 parent 4b7a0d5 commit 69fc9a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/Transforms/Yk/ControlPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ class YkControlPoint : public ModulePass {

// Get live variables.
LivenessAnalysis LA(Caller);
auto Lives = LA.getLiveVarsBefore(OldCtrlPointCall);
auto Lives =
LA.getLiveVarsBefore(OldCtrlPointCall->getNextNonDebugInstruction());

Value *SMID = ConstantInt::get(Type::getInt64Ty(Context), CPStackMapID);
Value *Shadow = ConstantInt::get(Type::getInt32Ty(Context), CPShadow);
Expand Down

0 comments on commit 69fc9a9

Please sign in to comment.