Commit Graph

10 Commits

Author SHA1 Message Date
Arnold Schwaighofer
eb609d0420 Address review comment 2019-05-20 14:10:59 -07:00
Arnold Schwaighofer
6c0baaee85 Fix closurescope analysis
rdar://50949761
2019-05-20 13:20:23 -07:00
Michael Gottesman
234fcc1771 [pass-manager] notifyDeleteFunction => notifyWillDeleteFunction.
This name makes it clear that the function has not yet been deleted and also
contrasts with the past tense used in the API notifyAddedOrModifiedFunction to
show that said function has already added/modified the function.
2018-07-16 14:11:06 -07:00
Michael Gottesman
56d100f493 [analysis] Standardize AnalysisKind by moving it out of SILAnalysis into its own "struct enum" in a non-nested scope.
Generally in the SIL/SILOptimizer libraries we have been putting kinds in the
swift namespace, not a nested scope in a type in swift (see ValueKind as an
example of this).
2018-07-15 11:00:33 -07:00
Huon Wilson
978a5c89b1 [SILOptimizer] std::function -> llvm::function_ref for some non-escaping params. 2018-05-01 08:29:07 +10:00
Andrew Trick
0dfce6c0f6 Don't rerun mandatory lowering passes on deserialized SIL. 2018-02-09 09:55:47 -08:00
Andrew Trick
c1f8d094a0 Add an assert for cycles in the closure graph. 2017-06-17 18:56:48 -07:00
Andrew Trick
0ce81c90f0 Doxygen formatting. 2017-06-17 16:19:16 -07:00
Andrew Trick
94db617471 Add TopDownClosureFunctionOrder based on ClosureScopeAnalysis.
Simple utility for transfersing functions such that parent scopes are always
visited before noescape closures.

Note that recursion is disallowed. Noescape closures are not reentrant.
2017-06-16 19:08:40 -07:00
Andrew Trick
3bec7d81ac Add ClosureScopeAnalysis.
Record noescape closure scopes. This allows passes to process closures and their
parent scopes in a controlled order. AccessEnforcementSelection needs this
because it needs to process parent scopes before selecting enforcement within
noescape closures.

Eventually this could be used by the PassManager so that
AccessEnforcementSelection can go back to being a function transform.
2017-06-16 19:08:39 -07:00