Michael Gottesman
d069169c0d
Fix some typos.
2023-10-24 12:47:11 -07:00
Michael Gottesman
2c0efe6b8b
[region-isolation] Go through the implementation again changing Consume -> Transfer.
...
I just missed these.
2023-10-23 13:52:14 -07:00
Michael Gottesman
578eafdb46
[region-isolation] Eliminate a temporary std::vector.
...
We can just pass in an ArrayRef here. I missed this inefficiency when I was
going through the pass earlier.
2023-10-23 12:24:17 -07:00
Michael Gottesman
fb7b4a3a32
[region-isolation] Add verbose logging to PartitionUtils behind a flag.
...
One needs to pass in the explicit flag to enable this as well as
-debug-flag=send-non-sendable. This makes it easier to debug the affect of
applying specific partition ops.
2023-10-23 12:24:17 -07:00
Michael Gottesman
8d46cc8c08
[isolation-regions] Rename Consume to Transfer.
...
Transfer is the terminology that we are using for something be transferred
across an isolation boundary, not consume. This also eliminates confusion with
consume which is a term being used around ownership.
2023-09-22 16:21:46 -05:00
Michael Gottesman
82fbde0e04
[send-non-sendable] Ensure that we properly warn if a field of a final actor is transferred.
...
Previously, we were not recognizing that a ref_element_addr from an actor object
is equivalent to the actor object and we shouldn't allow for it to be consumed.
rdar://115132118
2023-09-12 12:46:37 -05:00
Michael Gottesman
3a377a3e51
[send-non-sendable] When logging the pseudo-ir dump out the root representative value associated with pseudo-ir ids.
...
Really, we should just be using representative values here in general since it
serves the same purpose and makes it easier to trace back values. But this in
the short term makes the output easier to reason about.
2023-09-12 12:11:44 -05:00
Michael Gottesman
42df9c4c72
[send-non-sendable] Cleanup logging a little.
...
Specifically:
1. Converted llvm::errs() -> llvm::dbgs() when using LLVM_DEBUG.
2. Converted a dump method on errs to be a print method on dbgs that is called from dump with print(llvm::dbgs()).
2023-09-12 12:11:44 -05:00
Michael Gottesman
a1daf817f3
[send-non-sendable] Remove ASCII color from log output.
...
Not everyone uses color output and having to remove the ASCII color support is
annoying.
2023-09-11 09:07:29 -05: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
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
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