Michael Gottesman
4f20b5ddbb
[send-non-sendable] Move utility functions into a utility section.
...
I also used a more general way to check for apply insts that are not builtins
(ApplySite).
2023-08-25 11:59:12 -07:00
Michael Gottesman
bfb204643f
[send-non-sendable] Cleanup the main SILFunctionTransform.
2023-08-25 11:58:16 -07:00
Michael Gottesman
373a007efa
[send-not-sendable] Eliminate relative includes and add a file header.
...
Specifically, the two routines we were importing relatively were:
1. TypeChecker::conformsToProtocol. I moved this onto a helper routine on
SILType.
2. swift::findOriginalValueType(Expr *). This routine just looks through various
implicit conversions to find the original underlying type. I moved it to a
helper method on Expr.
2023-08-23 14:38:30 -07:00
jturcotti
bb2f3c011e
rename DeferredSendableChecking pass to SendNonSendable pass, handle more instructions such as try_apply and begin_apply, and fix bugs
2023-07-27 16:45:29 -07:00
jturcotti
853ef7cf3c
fix bugs that present themselves when handling multiarg and varargs functions, including adding better debug dump methods
2023-07-20 14:01:08 -07:00
jturcotti
a83d7aa39c
improve diagnostics about data races; highlight the individual expressions being sent and accessed as precisely as possible, and include information about specific non-sendable types and isolation crossings
2023-07-19 17:27:16 -07:00
jturcotti
55e8f9f2ed
improve debug output, finalize explicit constructor refactor, and begin improving diagnostic messages
2023-07-18 15:58:56 -07:00
jturcotti
5f42a142df
handle tuple creation
2023-07-18 14:32:12 -07:00
jturcotti
3868f1dc27
perform refactor to use named types as elements and regions in partitions, and ensure that all SILValues are converted once to TrackableSILValues in the SendNonSendable analysis pass
2023-07-18 13:32:43 -07:00
jturcotti
34113c4c0f
implement searching for a ConsumeReason instead of just diagnosing accesses to consumed values
2023-07-14 16:12:52 -07:00
jturcotti
1d130390be
add more comprehensive cases to tests, and fix many bugs, relying on much more potent resolution of addresses
2023-07-14 09:28:27 -07:00
jturcotti
1a716d82cf
replace use of internal "projections" tracking map with usage of memutils' AccessStorage utilities
2023-07-14 09:28:26 -07:00
jturcotti
65fa6fd966
use LLVM_DEBUG instead of static DEBUG constant
2023-07-12 09:36:21 -07:00
jturcotti
e7a1747af2
Tweak, improve, and debug the PartitionAnalysis engine until a fairly comprehensive suite of simple tests passes (region_based_sendability.swift)
2023-07-11 11:12:38 -07:00
jturcotti
29bd728f4c
Begin to fill in the SendNonSendable SIL pass using a PartitionAnalysis engine, works for some simple examples but needs to address address values in SIL.
2023-07-10 15:20:14 -07:00
jturcotti
aae9f43bda
Write PartitionUtils.h, implementing common utilities for manipulating a partition data structure that will be used for flow-sensitive, region-based Sendable checking.
2023-07-10 15:20:14 -07:00
jturcotti
aa9f1a3584
add an experimental feature DeferSendableChecking to defer the sendable checking of some sites. For now, only diagnostics corresponding to non-sendable arguments passed to calls with unsatisfied isolation are deferred. A SIL pass SendNonSendable is added to emit the deferred diagnostics, and ApplyExpr is appropriately enriched to make that deferral possible.
2023-07-03 09:52:11 -07:00