Commit Graph

9 Commits

Author SHA1 Message Date
Ben Barham
ef8825bfe6 Migrate llvm::Optional to std::optional
LLVM has removed llvm::Optional, move over to std::optional. Also
clang-format to fix up all the renamed #includes.
2024-02-21 11:20:06 -08:00
Allan Shortlidge
e8ae38365d SILOptimizer: Compute ProtocolConformanceAnalysis cache lazily.
When serializing modules with `-experimental-skip-all-function-bodies`, this
analysis was eagerly populating a cache that would go unused since there is no
optimization to do. With `-experimental-lazy-typecheck`, this work would also
trigger unnecessary typechecking requests. NFC.
2023-08-31 10:58:56 -07:00
Varun Gandhi
c14e934563 [NFC] Remove redundant includes for llvm/ADT/SmallSet.h. 2020-05-31 13:07:45 -07:00
Raj Barik
0070730e5a Perform ExistentialSpecializer when SoleConformingType is known 2019-01-07 14:47:39 -08:00
Raj Barik
d9a051ecdc Concrete type propagation using ProtocolConformanceAnalysis 2018-08-22 11:08:29 -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
190008418e [pass-manager] notifyAddFunction => notifyAddedOrModifiedFunction.
The name notifyAddFunction is actively harmful since the pass manager uses this
entrypoint to notify analyses of added *OR* modified functions. It is up to the
caller analysis to distinguish in between these cases.

I am not vouching for the design, just trying to make names match the
current behavior.
2018-07-16 13:10:28 -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
Raj Barik
c2aef11cff ProtocolConformanceAnalysis for a non-public protocol returns all the types (classes, structs, and enums) that conform to it. It is performed in the whole-module-compilation mode. 2018-06-18 13:38:24 -07:00