Change the specialization API to allow specialization of individual calls

and specialization using a call tree.

Swift SVN r25573
This commit is contained in:
Nadav Rotem
2015-02-27 00:32:03 +00:00
parent 690cc050f0
commit 285e2e88e1
2 changed files with 16 additions and 6 deletions

View File

@@ -41,10 +41,11 @@ public:
// functions in reverse order.
auto &CG = CGA->getCallGraph();
auto GS = GenericSpecializer(getModule());
GS.addApplyInst(CG.getBottomUpFunctionOrder());
// Try to specialize generic calls.
if (GS.specialize()) {
bool Changed = GS.specialize(CG.getBottomUpFunctionOrder());
if (Changed) {
// Schedule another iteration of the transformation pipe.
PM->scheduleAnotherIteration();