swift-ci
1b56b27c3b
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-22 12:34:33 -07:00
Erik Eckstein
b7e5ec825a
MandatoryPerformanceOptimizations: force inlining of transparent functions and de-virtualization
...
Do this even if the function then contains references to other functions with wrong linkage. Instead fix the linkage later.
Fixes a false error in embedded swift.
rdar://134352676
2024-08-22 09:15:14 +02:00
swift-ci
0712db4d30
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-21 23:34:28 -07:00
eeckstein
b1a88beab5
Merge pull request #75836 from eeckstein/fix-vtable-specializer
...
VTableSpecializer: fix a crash for methods which have their own generic parameters
2024-08-22 08:20:19 +02:00
swift-ci
e27edcada1
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-21 16:49:14 -07:00
Slava Pestov
39b4bda1dc
AST: Introduce SubstFlags::SubstituteLocalArchetypes
2024-08-21 14:23:37 -04:00
Slava Pestov
ae77d6f0c1
AST: Replace one-off predicates with SubstitutionMap::getRecursiveProperties()
2024-08-21 13:19:10 -04:00
Erik Eckstein
ba9bfaf5d5
VTableSpecializer: fix a crash for methods which have their own generic parameters
...
rdar://133334324
2024-08-21 17:01:35 +02:00
Mykola Pokhylets
9a0df5bcbf
Don't add swift_retainCount() to RuntimeFunctions.def, but explicitly link it in linkEmbeddedRuntimeFromStdlib()
2024-08-21 14:53:09 +02:00
swift-ci
e4951fa963
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-20 22:34:45 -07:00
eeckstein
011c127c16
Merge pull request #75987 from eeckstein/fix-embedded-errors
...
CrossModuleOptimization: serialized witness tables in embedded mode
2024-08-21 07:29:27 +02:00
swift-ci
b08f7a1307
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-20 13:58:19 -07:00
Slava Pestov
b434c9fb56
Merge pull request #75984 from slavapestov/clean-up-opened-archetype
...
Clean up OpenedArchetypeType construction and more
2024-08-20 16:52:55 -04:00
swift-ci
66cb8804c0
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-20 12:36:22 -07:00
Erik Eckstein
44d85c1f72
CrossModuleOptimization: serialized witness tables in embedded mode
...
This is needed so that client modules can de-virtualize witness method calls.
Fixes a false "cannot use a value of protocol type in embedded Swift" error.
rdar://133993657
2024-08-20 20:32:32 +02:00
Slava Pestov
ff308e9510
AST: Remove TypeBase::openAnyExistentialType()
2024-08-20 12:15:27 -04:00
Slava Pestov
0c2f28fd3d
AST: Remove GenericSignature parameter from OpenedArchetypeType::get()
2024-08-20 12:15:27 -04:00
Erik Eckstein
9053cce8a4
SimplifyCFG: fix an ownership verifier error caused by switch_enum simplification
...
If constant folding a switch_enum ends up in branching to a no-payload case, the enum value still needs to be destroyed to satisfy the ownership verifier.
https://github.com/swiftlang/swift/issues/74903
rdar://131726690
2024-08-20 10:13:52 +02:00
swift-ci
97eaf355ae
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-19 18:34:33 -07:00
Slava Pestov
f4c3d8f7d6
Merge pull request #75966 from slavapestov/more-removal-of-root
...
Remove some usages of ArchetypeType::getRoot()
2024-08-19 21:18:05 -04:00
swift-ci
2c388b055e
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-19 16:34:37 -07:00
Michael Gottesman
083b10a879
Merge pull request #75963 from gottesmm/pr-fb279661a394bc36c6aea28f928d0c7e3adfdea4
...
[region-isolation] Tweak the logging to make it easier to quickly find the emitted error when triaging code.
2024-08-19 16:17:51 -07:00
swift-ci
97f3a1b5e1
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-19 15:15:58 -07:00
Michael Gottesman
582144a017
Merge pull request #75960 from gottesmm/pr-d0a4bbf70b470c53c7f2435ee53051da8fd643d3
...
[region-isolation] Move the region isolation logging decls out of PartitionUtils.h -> RegionIsolation.h
2024-08-19 15:06:51 -07:00
Slava Pestov
76ec591fde
AST: hasOpenedExistentialWithRoot() => hasLocalArchetypeFromEnvironment()
2024-08-19 16:55:10 -04:00
Michael Gottesman
a36b3749dc
[region-isolation] Tweak the logging to make it easier to quickly find the emitted error when triaging code.
...
Just trying to improve my triaging speed by making it easier to triage.
2024-08-19 12:25:54 -07:00
Michael Gottesman
b477433a20
[region-isolation] Move the region isolation logging decls out of PartitionUtils.h -> RegionIsolation.h
...
These do not specifically have to do with PartitionUtils... they are really
logging options for the whole infrastructure, so it makes sense to have them in
the a different file.
2024-08-19 11:28:55 -07:00
swift-ci
a5ec343a08
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-17 06:14:34 -07:00
Slava Pestov
0e853a358e
Merge pull request #75935 from slavapestov/remove-transform
...
AST: Replace remaining uses of Type::transform() with transformRec()
2024-08-17 09:11:52 -04:00
swift-ci
bb96b71481
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-15 17:26:32 -07:00
Michael Gottesman
03713498f7
Merge pull request #75873 from gottesmm/pr-6c64f2f0a43f93b59babd44b8bac2c396a039e2f
...
[region-isolation] Improve the error we emit for closure literals captured as a sending parameter.
2024-08-15 17:03:52 -07:00
Michael Gottesman
4bb2e4f3b1
[region-isolation] Improve the error we emit for closure literals captured as a sending parameter.
...
Specifically:
I changed the main error message to focus on the closure and that the closure
is being accessed concurrently.
If we find that we captured a value that is the actual isolation source, we
emit that the capture is actually actor isolated.
If the captured value is in the same region as the isolated value but is not
isolated, we instead say that the value is accessible from *-isolated code or
code within the current task.
If we find multiple captures and we do not which is the actual value that was
in the same region before we formed the partial apply, we just emit a note on
the captures saying that the closure captures the value.
I changed the diagnostics from using the phrase "task-isolated" to use some
variant of accessible to code in the current task.
The idea is that in all situations we provide a breadcrumb that the user can
start investigating rather than just saying that the closure is "task-isolated".
From a preconcurrency perspective, I made it so that we apply the preconcurrency
behavior of all of the captures. This means that if one of the captures is
preconcurrency, we apply the preconcurrency restriction to the closure. This is
one step towards making it so that preconcurrency applies at the region level...
we just are not completely there yet.
rdar://133798044
2024-08-14 10:37:31 -07:00
swift-ci
e545ba00b7
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-14 00:55:30 -07:00
Meghana Gupta
49bb19d27e
Fix debug info in LICM
...
Use RegularLocation::getAutoGeneratedLocation() while hoisting a load.
Previously the source location of the preheader's terminator was used,
this need not be a RegularLocationKind triggering verification errors.
2024-08-14 01:49:58 +05:30
swift-ci
88e671860c
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-12 23:33:59 -07:00
Kuba (Brecka) Mracek
2941f24da3
Merge pull request #75308 from kubamracek/embedded-indexing-non-wmo
...
[embedded] Don't produce PerfDiags when in non-WMO mode (e.g. when building during indexing)
2024-08-12 23:29:30 -07:00
swift-ci
370a0b4ecf
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-12 15:14:17 -07:00
Michael Gottesman
fd863f90e8
Merge pull request #75841 from gottesmm/pr-4c4ea8453f92202322e4254fa1156e77a0716bc3
...
[region-isolation] Improve debug logging
2024-08-12 15:04:39 -07:00
Slava Pestov
b601c294ac
AST: Replace remaining uses of Type::transform() with transformRec()
2024-08-12 16:05:43 -04:00
Michael Gottesman
8a20df1c44
[region-isolation] When dumping send never-sendable errors, dump the isolated value and its name if we can compute it.
...
This just makes it quicker/easier to diagnose inability to infer the appropriate
name of an isolated value and what the isolated value itself is.
2024-08-12 11:35:57 -07:00
Michael Gottesman
2535ef0c87
[region-isolation] When dumping info for send never sendable, dump the full one line logging of the isolation instead of just the diagnostics.
2024-08-12 11:35:57 -07:00
swift-ci
6cd717acec
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-12 10:35:39 -07:00
Erik Eckstein
1dab2942df
Optimizer: enable the DeinitDevirtualizer pass
...
It was disabled so far to not hide bugs in the deinit code generation. Now hopefully deinit code generation is stable enough to enable the pass.
2024-08-12 13:34:51 +02:00
Erik Eckstein
65adc5a582
FunctionSignatureOpts: don't convert non-copyable owned -> guaranteed arguments
...
It's not safe to insert a compensating release_value at the call site.
This release_value calls the deinit which might have been already de-virtualized in the callee.
2024-08-12 08:54:22 +02:00
Kuba Mracek
80056c15cd
[embedded] Explicitly disable PerfDiags from SourceKit instead of always disabling when WMO is off
2024-08-10 14:50:22 -07:00
Kuba Mracek
3ad777b942
[embedded] Don't produce PerfDiags when in non-WMO mode (e.g. when building during indexing)
2024-08-10 14:48:24 -07:00
swift-ci
e7794ef4e4
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-09 23:13:57 -07:00
Meghana Gupta
920c5603fc
Merge pull request #75807 from meg-gupta/fixdebuginfodoe
...
Fix debug info in DeadObjectElimination in OSSA
2024-08-10 11:28:43 +05:30
Ben Barham
467e528200
Merge remote-tracking branch 'origin/main' into manual-rebranch-merge
...
Conflicts:
- `lib/Serialization/ModuleFormat.h` bumped version to account for
differences between main and rebranch.
2024-08-09 15:22:39 -07:00
Michael Gottesman
226e97a5a6
[region-isolation] Clean up some code now that SILBasicBlock::{dump,print}ID are in front of NDEBUG.
2024-08-09 11:10:37 -07:00