Add call graph support for an apply of a partial_apply.

We can sometimes determine exactly what we'll be calling by looking at
the callee of the partial_apply.

Nothing will directly make use of this yet, although it could perturb
the SCC ordering of the call graph.

Swift SVN r26586
This commit is contained in:
Mark Lacey
2015-03-26 09:00:33 +00:00
parent 62065f7f50
commit dfccb5dca5

View File

@@ -100,6 +100,10 @@ bool CallGraph::tryGetCalleeSet(SILValue Callee,
return true;
}
case ValueKind::PartialApplyInst:
return tryGetCalleeSet(cast<PartialApplyInst>(Callee)->getCallee(),
CalleeSet, Complete);
case ValueKind::DynamicMethodInst:
// TODO: Decide how to handle these in graph construction and
// analysis passes. We might just leave them out of the
@@ -155,7 +159,6 @@ bool CallGraph::tryGetCalleeSet(SILValue Callee,
return true;
}
case ValueKind::PartialApplyInst:
case ValueKind::ClassMethodInst:
case ValueKind::SuperMethodInst:
// TODO: Each of these requires specific handling.