Commit Graph

20 Commits

Author SHA1 Message Date
John McCall
3fe70968cc Remove the substitution map from zeroInitializer builtin in SIL.
This is a value operation that can work just fine on lowered types,
so there's no need to carry along a formal type. Make the value/address
duality clearer, and enforce it in the verifier.
2025-03-26 00:34:15 -04:00
Meghana Gupta
453369517a Allow recompilation of modules in the resource directory when importing non-ossa module to ossa module
This effects local swift development only and is needed now to use -enable-ossa-modules in local tests that
import Synchronization and Distributed which are non-ossa.
2025-01-08 20:45:37 -08:00
Erik Eckstein
7cceaff5f3 SIL: don't print operand types in textual SIL
Type annotations for instruction operands are omitted, e.g.

```
  %3 = struct $S(%1, %2)
```

Operand types are redundant anyway and were only used for sanity checking in the SIL parser.

But: operand types _are_ printed if the definition of the operand value was not printed yet.
This happens:

* if the block with the definition appears after the block where the operand's instruction is located

* if a block or instruction is printed in isolation, e.g. in a debugger

The old behavior can be restored with `-Xllvm -sil-print-types`.
This option is added to many existing test files which check for operand types in their check-lines.
2024-11-21 18:49:52 +01:00
Daniel Rodríguez Troitiño
ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -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
Alejandro Alonso
8ed84e8aed Handle the mark_dependence chain when eliminating copies in ClosureLifetimeFixup 2024-06-20 14:44:11 -07:00
Guillaume Lessard
dabd99d798 Revert "[stdlib] Mark some UnsafePointer APIs as transparent" 2024-06-03 09:40:37 -07:00
Alejandro Alonso
47c584f94f Update Cell.swift 2024-05-30 15:04:38 -07:00
Kavon Farvardin
0420310623 NCGenerics: it's no longer "experimental"
resolves rdar://127701059
2024-05-08 10:49:12 -07:00
Alejandro Alonso
e911667b30 Update Cell.swift
don't forget the end label
2024-03-29 11:00:06 -07:00
Alejandro Alonso
e1ec457ebe Remove pedantic checks 2024-03-28 19:51:01 -07:00
Alejandro Alonso
f5e10e2c0b Get rid of sil instruction and use a builtin for addressOfRawLayout 2024-03-27 11:36:29 -07:00
Alejandro Alonso
937c85c54e Add documentation and some tests
Add case to SILVerifier
2024-03-27 09:47:52 -07:00
nate-chandler
ee3875b61d Merge pull request #72261 from nate-chandler/rdar124464363
[Test] Eased check lines for 32-bit.
2024-03-12 17:40:40 -07:00
Alejandro Alonso
6e9e9c4ca7 Merge pull request #72086 from Azoy/kill-dead-atomics
[DeadObjectElimination] Zero init is not a barrier
2024-03-12 14:39:56 -07:00
Nate Chandler
dbe4da99d0 [Test] Eased check lines for 32-bit. 2024-03-12 11:11:01 -07:00
Nate Chandler
08a832b803 [AllocBoxToStack] Transfer var_decl flag.
As with the lexical flag, when creating an alloc_stack corresponding to
an alloc_box, transfer the var_decl flag from any begin_borrow users of
the box.
2024-03-08 22:28:22 -08:00
Alejandro Alonso
135533e205 Zero init is not a barrier for DOE 2024-03-04 23:17:32 -08:00
Alejandro Alonso
38be421889 Simplify the atomic sil tests 2024-02-23 12:19:32 -08:00
Alejandro Alonso
da9abaf12c Add a SIL optimizer test that ensures we dont destroy atomics before use 2024-02-23 10:35:40 -08:00