Moves SignatureAnalyzer and ArgumentDescriptor/ResultDescriptor into a separate

analysis pass.

This pass is run on every function and the optimized signature is return'ed through the
getArgDescList and getResultDescList.

Next step is to split to cloning and callsite rewriting into their own function passes.

rdar://24730896
This commit is contained in:
Xin Tong
2016-03-15 12:16:56 -07:00
parent b25019c259
commit 069612bccc
7 changed files with 659 additions and 533 deletions

View File

@@ -1172,6 +1172,16 @@ ProjectionTree::~ProjectionTree() {
N->~ProjectionTreeNode();
}
void
ProjectionTree::initializeWithExistingTree(const ProjectionTree &PT) {
Kind = PT.Kind;
EpilogueReleases = PT.EpilogueReleases;
LiveLeafIndices = PT.LiveLeafIndices;
for (const auto &N : PT.ProjectionTreeNodes) {
ProjectionTreeNodes.push_back(new (Allocator) ProjectionTreeNode(*N));
}
}
SILValue
ProjectionTree::computeExplodedArgumentValueInner(SILBuilder &Builder,
SILLocation Loc,