We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3b11c63 + 5613b25 commit 5bbd767Copy full SHA for 5bbd767
llvm/lib/Transforms/Yk/ControlPoint.cpp
@@ -89,9 +89,19 @@ CallInst *findControlPointCall(Module &M) {
89
}
90
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
95
std::vector<Value *> getLiveVars(DominatorTree &DT, CallInst *OldCtrlPoint) {
96
std::vector<Value *> Vec;
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.
105
for (auto &BB : *Func) {
106
if (!DT.dominates(cast<Instruction>(OldCtrlPoint), &BB)) {
107
for (auto &I : BB) {
0 commit comments