Skip to content

Commit 4c3be08

Browse files
committed
Remove loads after control point.
Since we can no longer return naturally from the control point, we don't need to keep these loads around anymore.
1 parent e5e3b1d commit 4c3be08

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

llvm/lib/Transforms/Yk/ControlPoint.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -199,23 +199,6 @@ class YkControlPoint : public ModulePass {
199199
OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_LOC_IDX),
200200
InputStruct, FAddr});
201201

202-
// Once the control point returns we need to extract the (potentially
203-
// mutated) values from the returned YkCtrlPointStruct and reassign them to
204-
// their corresponding live variables. In LLVM IR we can do this by simply
205-
// replacing all future references with the new values.
206-
LvIdx = 0;
207-
Instruction *New;
208-
for (Value *LV : LiveVals) {
209-
Value *FieldPtr =
210-
Builder.CreateGEP(CtrlPointVarsTy, InputStruct,
211-
{Builder.getInt32(0), Builder.getInt32(LvIdx)});
212-
New = Builder.CreateLoad(TypeParams[LvIdx], FieldPtr);
213-
LV->replaceUsesWithIf(
214-
New, [&](Use &U) { return DT.dominates(NewCtrlPointCallInst, U); });
215-
assert(LvIdx != UINT_MAX);
216-
LvIdx++;
217-
}
218-
219202
// Replace the call to the dummy control point.
220203
OldCtrlPointCall->eraseFromParent();
221204

0 commit comments

Comments
 (0)