[arc-opts] After the arc optimizer converges, run another round of the ARC

optimizer freezing releases in the epilogue of functions that match to
SILArguments. This allows us to treat all such SILArguments throughout the
entire function as having a post dominating release.

<rdar://problem/18923030>

Swift SVN r23253
This commit is contained in:
Michael Gottesman
2014-11-11 23:37:09 +00:00
parent ed9a765d43
commit 7a2e1fb4d3
6 changed files with 75 additions and 18 deletions

View File

@@ -107,7 +107,14 @@ void
destroyARCMatchingSetComputationContext(ARCMatchingSetComputationContext *Ctx);
/// Use the opaque context to recompute the matching set for the input function.
///
/// \param Ctx The opaque context for the computation.
/// \param FreezeOwningPtrEpiloqueReleases Should we not attempt to move, remove
/// epilogue release pointers and instead use them as post dominating releases
/// for other pointers.
/// \param Fun The function to call with the ARC matching
bool computeARCMatchingSet(ARCMatchingSetComputationContext *Ctx,
bool FreezeOwningPtrEpiloqueReleases,
std::function<void (ARCMatchingSet&)> Fun);
/// A class that attempts to match owned arguments and corresponding epilogue