Karoy Lorentey
eb70402031
[test] XFAIL two new nontrivial test failures
2024-03-18 11:08:32 -07:00
Alex Hoppen
978145c61d
[Parser] Remove remaining -disable-experimental-parser-round-trip uses in test cases
...
All the features in these test cases are now supported by the new parser, so we don’t need the opt-out anymore.
rdar://124646502
2024-03-15 12:30:40 -07:00
Meghana Gupta
237b70c7d4
Merge pull request #72314 from meg-gupta/fixnonestructonly
...
Fix ownership of move-only structs in SIL
2024-03-15 01:28:12 -07:00
Meghana Gupta
a15d5fea09
Fix ownership of move-only structs in SIL
...
Not doing this for enums yet because it is tripping the ownership verifier
We dont have move-only tuples yet.
2024-03-13 16:24:57 -07:00
Pavel Yaskevich
f0eaca7bd2
[Tests] NFC: Disable diagnostics in test/SIL/lifetime_dependence_buffer_view_test.swift
...
With NCGenerics enabled the test-case started producing a diagnostic
in a spot marked with a TODO, Meghana suggested to temporary disable
the diagnostics.
2024-03-13 14:50:00 -07:00
Alexis Laferrière
88206a5a20
Tests: disable SIL test on armv7k
2024-03-12 11:20:48 -07:00
Joe Groff
5a326a1465
Merge pull request #72193 from jckarter/memory-lifetime-verifier-nondestructive-enum-addr
...
MemoryLifetimeVerifier: Treat only destructive enum_data_addr insns as writes.
2024-03-11 21:16:59 -07:00
Joe Groff
2722f1adcd
MemoryLifetimeVerifier: Treat only destructive enum_data_addr insns as writes.
...
It is ok to project the data from an enum in cases where we know spare bit
packing can never happen. Fixes rdar://124240723.
2024-03-11 09:49:57 -07:00
Nate Chandler
7884892d08
[SIL] Fix alloc_box cloning.
...
Previously, all the flags were dropped upon cloning.
2024-03-08 22:28:22 -08:00
Nate Chandler
3dbeebaa9b
[SIL] Add var_decl flag to alloc_stack.
2024-03-08 22:28:22 -08:00
Meghana Gupta
73c424ea08
Merge pull request #72160 from meg-gupta/motest
...
Add test to show ~Copyable struct has OwnershipKind::None in SIL
2024-03-08 12:58:54 -08:00
Meghana Gupta
6fef3690bb
Add variants of ~Copyable types to show a ~Copyable struct has OwnershipKind::None
2024-03-07 14:08:40 -08:00
Meghana Gupta
f3b225a395
Fix computation of argument index in the presence of indirect error results
...
Fixes rdar://124108894
2024-03-07 02:02:33 -08:00
Michael Gottesman
99e3f7fb13
[region-isolation] Make RegionBasedIsolation an upcoming feature for swift 6.
...
To make the tests pass, I had to teach sil-opt how to setup upcoming features
since it did not know how to parse them.
rdar://124100266
2024-03-05 15:15:14 -08:00
Meghana Gupta
a9b1de47cc
Remove unnecessary -enable-builtin-module flag from lifetime dependence tests
2024-02-27 15:59:33 -08:00
Meghana Gupta
0b574c4b39
Remove -enable-experimental-lifetime-dependence-inference now that it is enabled by default
2024-02-27 15:56:50 -08:00
Meghana Gupta
55153ce00f
Fix lifetime dependence inference for multi-arg functions
2024-02-27 15:53:32 -08:00
Meghana Gupta
afdd141714
Ban lifetime dependence specifiers on tuple result
2024-02-23 15:29:05 -08:00
Meghana Gupta
ca73cba046
Enable lifetime dependence inference when NonescapableTypes is on
2024-02-23 01:49:47 -08:00
Meghana Gupta
fb4bfefa1d
[NFC] Update CHECK lines for lifetime dependence tests
2024-02-20 22:34:36 -08:00
Meghana Gupta
01efb6dfe7
Make BufferView prototype more realistic
2024-02-20 13:29:04 -08:00
Meghana Gupta
c628bc1362
Add test for lifetime dependence inference in subscripts
2024-02-20 13:29:00 -08:00
Meghana Gupta
820929438b
Add support for lifetime dependence inference for _read/_modify accessors
2024-02-19 15:28:04 -08:00
Meghana Gupta
3fa0886206
Merge pull request #71677 from meg-gupta/lifetimedepgetter
...
Support lifetime dependence inference on getters
2024-02-16 14:53:02 -08:00
Meghana Gupta
3ddb524fa6
Add a BufferView prototype test
2024-02-15 23:58:08 -08:00
Meghana Gupta
dfa95c4e48
Support lifetime dependence inference on getters
2024-02-15 23:29:12 -08:00
Kavon Farvardin
08b71e0136
NCGenerics: rebuild stdlib from its interface
...
When a NoncopyableGenericsMismatch happens between the compiler and
stdlib, allow the compiler to rebuild the stdlib from its interface
instead of exiting with an error.
2024-02-15 18:08:54 -08:00
Meghana Gupta
28c0e4db20
Merge pull request #71640 from meg-gupta/inferinit
...
Update diagnostics for lifetime dependence
2024-02-15 03:45:10 -08:00
Meghana Gupta
59a401d337
Update tests
2024-02-15 00:58:38 -08:00
Slava Pestov
de885df00e
Merge pull request #71187 from hjyamauchi/win-865-test
...
Add a test for the SIL type equality assert failures due to opaque re…
2024-02-14 23:12:42 -05:00
Meghana Gupta
455a3d5e05
Enable lifetime dependence inference on parameters with just ownership modifiers
2024-02-14 19:50:03 -08:00
Michael Gottesman
23ab974574
Merge pull request #71567 from gottesmm/transferring-param
...
[transferring] Implement transferring result and clean up transferring param support by making transferring a bit on param instead of a ParamSpecifier.
2024-02-14 17:54:48 -08:00
Meghana Gupta
0fd6ef3309
Add support for lifetime dependence mangling
2024-02-14 13:16:31 -08:00
Michael Gottesman
bf2ec7eb85
[transferring] Change transferring to no longer be a ParamSpecifier.
...
Instead it is a bit on ParamDecl and SILParameterInfo. I preserve the consuming
behavior by making it so that the type checker changes the ParamSpecifier to
ImplicitlyCopyableConsuming if we have a default param specifier and
transferring is set. NOTE: The user can never write ImplicitlyCopyableConsuming.
NOTE: I had to expand the amount of flags that can be stored in ParamDecl so I
stole bits from TypeRepr and added some logic for packing option bits into
TyRepr and DefaultValue.
rdar://121324715
2024-02-14 13:04:46 -08:00
Erik Eckstein
6e8b80c791
SIL: add printing and parsing support for specialized vtables
...
If the vtable refers to a specialized class, a SIL type specifies the bound generic class type:
```
sil_vtable $G<Int> {
// ...
}
```
2024-02-14 09:51:36 +01:00
Meghana Gupta
75bd5b08dd
Add LifetimeDependenceScopeFixup pass
2024-02-13 16:52:01 -08:00
Meghana Gupta
0b4cba9b25
Fix Lifetime dependence function type hash
...
Include LifetimeDependence kind in the hash.
2024-02-12 16:39:43 -08:00
Andrew Trick
da3f583492
Add mark_dependence [unresolved]
...
In preparation for inserting mark_dependence instructions for lifetime
dependencies early, immediately after SILGen. That will simplify the
implementation of borrowed arguments.
Marking them unresolved is needed to make OSSA verification
conservative until lifetime dependence diagnostics runs.
2024-02-08 22:53:16 -08:00
Meghana Gupta
8fd8bb99ec
Rename borrowLifetimeParamIndices -> scopeLifetimeParamIndices
2024-02-08 14:21:43 -08:00
Meghana Gupta
eb7a3d18ed
Add test for lifetime dependence on generic function
2024-02-08 02:17:10 -08:00
Meghana Gupta
60bf63d1ca
Update misc lifetime dependence tests
2024-02-08 02:16:39 -08:00
Nate Cook
e317febc9d
Revert "Allow normal function results of @yield_once coroutines ( #69843 )"
...
This reverts commit aa5b505014 .
2024-02-07 14:57:31 -06:00
Anton Korobeynikov
aa5b505014
Allow normal function results of @yield_once coroutines ( #69843 )
...
This adds SIL-level support and LLVM codegen for normal results of a coroutine.
The main user of this will be autodiff as VJP of a coroutine must be a coroutine itself (in order to produce the yielded result) and return a pullback closure as a normal result.
For now only direct results are supported, but this seems to be enough for autodiff purposes.
2024-02-06 22:13:15 -08:00
Kavon Farvardin
9e6f8ce488
Test: remove incorrect flag
2024-02-06 10:08:34 -08:00
Kavon Farvardin
05185dc9e9
Test: import Swift for the Copyable type
2024-02-06 10:01:27 -08:00
eeckstein
0943504b81
Merge pull request #71385 from eeckstein/perf-constraint-flag
...
IRGen: don't use value witness functions in outlined value operations for functions with performance constraints
2024-02-05 18:31:59 +01:00
Andrew Trick
e738b8a77e
Merge pull request #71353 from meg-gupta/initlifetimedep
...
Support for lifetime dependence specifiers on initializers
2024-02-05 08:55:54 -08:00
Erik Eckstein
38bfc03994
MandatoryPerformanceOptimizations: set the [perf_constraint] flag on functions with performance constraints
2024-02-05 12:38:53 +01:00
John McCall
dd90ae7416
Rename SIL's @isolated attribute to @sil_isolated.
...
We want to use @isolated in ordinary Swift, and while we could probably
make it coexist with this SIL use, doing so would be really inconvenient.
2024-02-03 01:51:36 -05:00
Meghana Gupta
c8ece100ba
Handle explicit lifetime dependence specifiers in initializers
2024-02-02 11:50:10 -08:00