Commit Graph

16 Commits

Author SHA1 Message Date
Andrew Trick
73e28df4be ForwardingUtils logging 2024-03-18 17:45:33 -07:00
Andrew Trick
ff14633532 Handle ConvertEscapeToNoEscapeInst in NonEscapingClosureDefUseWalker 2024-03-18 17:38:12 -07:00
Andrew Trick
aa208bbf91 Add SILType::containsNoEscapeFunction()
Add PartialApplyInst.hasNoescapeCapture
Add PartialApplyInst.mayEscape

Refactor DiagnoseInvalidEscapingCaptures. This may change functionality because tuples containing a noescape closure are now correctly recognized. Although I'm not sure such tupes can ever be captured directly.
2024-03-18 17:38:12 -07:00
Andrew Trick
ffe9c48976 Add LocalVariableUtils
This includes a reaching-def analysis that can be used by diagnostic passes. Diagnostics should be flow-sensitive.
2024-03-05 18:08:16 -08:00
Andrew Trick
73f7f8f28a Add NonEscapingClosureDefUseWalker
To find all effective applications of partial_apply [on-stack].
2024-03-05 17:08:13 -08:00
Andrew Trick
ac457abab9 LifetimeDependenceUseDefWalker: track the owner of the value. 2024-02-12 09:57:14 -08:00
Andrew Trick
800fa167a9 ForwardingUtils; minor cleanup 2024-01-30 08:38:57 -08:00
Andrew Trick
3f8a35e64f ForwardingUtils comments and cleanup. 2024-01-22 23:55:29 -08:00
Andrew Trick
c10c545cbe OwnershipUtils review feedback: code formatting. 2024-01-17 08:37:14 -08:00
Andrew Trick
2cac9fbd4c ForwardingUtils.swift cleanup. Make the API easier to extend. 2024-01-17 08:37:14 -08:00
Andrew Trick
5759d428e2 ForwardingUtils comment formatting.
Format comments so they are readable on github and 80-col tools.
2024-01-17 08:37:14 -08:00
Andrew Trick
b637f06acd [SIL] Bridge findPointerEscape() and fix OnoneSimplifyable
Do not bridge the hasPointerEscape flag until it is implemented.
2023-12-18 09:16:55 -08:00
Andrew Trick
13142e3957 ForwardingUtils.swift improvements
For diagnostics in the presence of dead values.
2023-10-12 09:39:34 -07:00
Andrew Trick
bd157b3be4 ForwardingUtils.swift unit tests 2023-10-10 13:42:48 -07:00
Andrew Trick
75ea3821ed Fix initial ForwardingInstruction implementation and handle phis 2023-10-10 13:40:23 -07:00
Andrew Trick
e27b308781 SwiftCompilerSources: added OwnershipUtils for ForwardingInstruction.
This could be combined with ValueUseDefWalker if the latter is
refactored to classsify instructions by projections and aggegation
(which always forward) vs. other arbitrary hard-coded instruction
types. It would also need to limit the walk to real operands (which
are always forwarded). Then this walker can call into the default walk
for projections and track the projection path. The current
implementation is however simpler and more efficient.
2023-10-03 23:54:57 -07:00