File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,19 @@ CallInst *findControlPointCall(Module &M) {
89
89
}
90
90
91
91
// / Extract all live variables that need to be passed into the control point.
92
+ // /
93
+ // / YKFIXME: This currently computes an over-approximation of what's live.
94
+ // / https://github.com/ykjit/yk/issues/515
92
95
std::vector<Value *> getLiveVars (DominatorTree &DT, CallInst *OldCtrlPoint) {
93
96
std::vector<Value *> Vec;
94
97
Function *Func = OldCtrlPoint->getFunction ();
98
+
99
+ // Add function arguments to the live set.
100
+ for (Value &Arg : Func->args ()) {
101
+ Vec.push_back (&Arg);
102
+ }
103
+
104
+ // Then add anything which dominates the control point to the live set.
95
105
for (auto &BB : *Func) {
96
106
if (!DT.dominates (cast<Instruction>(OldCtrlPoint), &BB)) {
97
107
for (auto &I : BB) {
You can’t perform that action at this time.
0 commit comments