Commit Graph

4401 Commits

Author SHA1 Message Date
Konrad `ktoso` Malawski
6e725f277d Update CLion instructions (#79900)
We use the `RelWithDebInfo` configuration nowadays, so correct the instructions.
2025-03-10 22:27:03 -07:00
Nate Chandler
a50a3f022b [CoroutineAccessors] Mangling.
Change the suffix to Twc and demangle.
2025-03-07 11:40:38 -08:00
Michael Gottesman
e608b98432 Merge pull request #79772 from gottesmm/pr-9dc8d133c4df0ac75898153321c06dfee9f3416a
[DebuggingTheCompiler] Add a note about using -debug-cycles to debug request evaluator cycles.
2025-03-04 18:38:54 -08:00
Michael Gottesman
297307549f [DebuggingTheCompiler] Add a note about using -debug-cycles to debug request evaluator cycles. 2025-03-04 13:10:40 -08:00
강수진
56144a0eb0 [docs] Fix markdown link text for SE-0302 (#79681)
Added missing link text for marker protocol reference.
2025-02-28 11:47:27 -08:00
nate-chandler
30d91d39bf Merge pull request #79625 from nate-chandler/general-coro/20250212/1
[CoroutineAccessors] Use retcon.once variant.
2025-02-27 12:58:49 -08:00
Nate Chandler
3d655f58a2 [IRGen] Add coroutine fp link entities.
Duplicative boilerplate copying what was done for async function
pointers which these have the same characteristics as.
2025-02-27 07:53:13 -08:00
Alastair Houghton
583a2f8df4 [Backtracing] Update JSON output slightly after review.
Always put `registers` in the thread record, and always use the `threads`
top level key, even if we ask for only the crashed thread.  Also add an
`omittedThreads` key.

rdar://121430255
2025-02-26 14:12:21 +00:00
Alastair Houghton
9fdbbc7e22 Update docs/Backtracing.rst
Fix a typo.

Co-authored-by: Honza Dvorsky <honza@apple.com>
2025-02-26 14:12:21 +00:00
Alastair Houghton
20685b991d [Docs] Update backtracing documentation.
Added documentation for the JSON output.

rdar://121430255
2025-02-26 14:12:20 +00:00
Alastair Houghton
0bc76dae80 [Backtracing] Add warning suppression option, enable it for tests.
The backtracing code will warn you if you attempt to forcibly enable
backtracing for a privileged executable.  This is apparently upsetting
the Driver/filelists.swift test.

Since we want to force it on for tests, so that we will definitely get
backtraces, add an option to suppress warning messages, and turn that
on for tests as well.

rdar://144497613
2025-02-24 12:55:16 +00:00
Pavel Yaskevich
7484f01f8e Merge pull request #79504 from xedin/execution-caller-mangling
[Mangling] Mangle presence of `@execution(caller)` in a function type
2025-02-20 14:01:26 -08:00
Konrad `ktoso` Malawski
e8668684a1 Merge pull request #79411 from amartini51/typo_144059094
Remove double word ("a a" and "the the")
2025-02-20 13:05:06 +09:00
Pavel Yaskevich
1067ead82c [Mangling] Mangle presence of @execution(caller) in a function type
If `@execution(caller)` attribute is present on a function type,
mark its presence in the mangling with `YC` suffix.
2025-02-19 16:48:41 -08:00
Alex Martini
633f101e0a Fix double 'the the' in various places 2025-02-14 17:27:51 -08:00
Alastair Houghton
864f3dc023 [Backtracing] Fix bug in Compact Image Map decoder.
The `expand` opcode was being decoded incorrectly in the case where we
were trying to expand prefixes with codes of 64 or above.

rdar://144497804
2025-02-14 14:59:20 +00:00
Erik Eckstein
6af5876f72 PerformanceInliner: add the @_semantics("optimize.sil.inline.aggressive") attribute to enable inlining into large functions.
This attribute overrides the limit of maximum number of basic blocks in the caller.
2025-02-13 07:40:24 +01:00
Erik Eckstein
a022457257 docs: update documentation of optimization related semantic attributes 2025-02-13 07:30:44 +01:00
Erik Eckstein
e0b4f71af6 SIL: remove the alloc_vector instruction
It's not needed anymore, because the "FixedArray" experimental feature is replaced by inline-arrays.
2025-02-12 10:51:14 +01:00
Max Desiatov
2f09abbdfc Fix typo, refine formatting in EmbeddedSwift/UserManual.md (#79197)
The document should refer to `libswiftUnicodeDataTables.a`, not `libUnicodeDataTables.a`, as the latter doesn't exist.
2025-02-06 20:53:53 -08:00
Andrew Trick
840ad142b9 [docs] mark_dependence description clarification 2025-02-03 10:02:40 -08:00
Alastair Houghton
ab8e561583 Merge pull request #78516 from al45tair/eng/PR-124913332
[Backtracing] Implement API per SE-0419
2025-01-28 10:48:33 +00:00
Alastair Houghton
26d0e49764 [Backtracing] Updates following review.
Added some explanatory text to the Compact Backtrace Format
documentation, and also to the `CMakeLists.txt` for the runtime.

Tweaked the conversions for `Backtrace.Address` to truncate, which
should result in reasonable behaviour for negative fixed-width
integers.

Use a constant for the ASCII values for `/` and `\` in the Compact
Image Format encoder/decoder.

Make the TSD key for `ElfImageCache` non-optional, and call
`fatalError()` if we don't get one.

rdar://124913332
2025-01-27 17:22:39 +00:00
Alastair Houghton
c9c5dc0de1 [Backtracing] Add platform and architecture information.
It's useful to capture the platform and platform version with the image map.
Also, display both the platform and architecture information when generating
a crash log.

rdar://124913332
2025-01-27 15:44:28 +00:00
eeckstein
95f1dfbf07 Merge pull request #78885 from eeckstein/fix-without-actually-escaping
Fix two problems with `withoutActuallyEscaping`
2025-01-27 07:59:02 +01:00
Michael Gottesman
0ea22f819a [rbi] Remove support for sending result for impl-function-type in the old mangler. 2025-01-24 13:19:18 -08:00
Erik Eckstein
3ec5d7de24 SIL: replace the is_escaping_closure instruction with destroy_not_escaped_closure
The problem with `is_escaping_closure` was that it didn't consume its operand and therefore reference count checks were unreliable.
For example, copy-propagation could break it.
As this instruction was always used together with an immediately following `destroy_value` of the closure, it makes sense to combine both into a `destroy_not_escaped_closure`.
It
1. checks the reference count and returns true if it is 1
2. consumes and destroys the operand
2025-01-24 19:23:27 +01:00
Michael Gottesman
7ae56aab2e [sil] Add a new instruction ignored_use.
This is used for synthetic uses like _ = x that do not act as a true use but
instead only suppress unused variable warnings. This patch just adds the
instruction.

Eventually, we can use it to move the unused variable warning from Sema to SIL
slimmming the type checker down a little bit... but for now I am using it so
that other diagnostic passes can have a SIL instruction (with SIL location) so
that we can emit diagnostics on code like _ = x. Today we just do not emit
anything at all for that case so a diagnostic SIL pass would not see any
instruction that it could emit a diagnostic upon. In the next patch of this
series, I am going to add SILGen support to do that.
2025-01-22 21:12:36 -08:00
Anthony Latsis
76d1ea3fd5 Merge pull request #78760 from AnthonyLatsis/solanum-melongena
docs: Fully spell out the name of `docs/ABI/CallConvSummary.rst`
2025-01-23 01:03:50 +00:00
Anthony Latsis
cbe420c79d docs: Fully spell out the name of docs/ABI/CallConvSummary.rst
"Conv" is ambiguous. Perhaps "CallConv" is not, but the full name is
still more helpful for those of us browsing or searching for targeted
info.
2025-01-22 21:05:42 +00:00
eeckstein
d314541245 Merge pull request #78715 from eeckstein/fix-typos
docs: fix two typos in SIL.md
2025-01-20 12:14:18 +01:00
Erik Eckstein
6907e26dd8 docs: fix two typos in SIL.md 2025-01-17 20:08:11 +01:00
Alastair Houghton
ffda416d36 [Backtracing] Add support for repeats to Compact Backtrace Format.
This lets us repeat a frame over and over; it only works for a single
frame, but that's the common case for infinite recursions.

rdar://124913332
2025-01-17 10:09:37 +00:00
Alastair Houghton
0e3e9efcd3 [Backtracing] Add ImageMap instead of just using an Array.
We want to be able to efficiently serialise lists of images, and to do so
it makes most sense to create a separate `ImageMap` type.  This also provides
a useful place to put methods to e.g. find an image by address or by build
ID.

rdar://124913332
2025-01-17 10:09:36 +00:00
Alastair Houghton
760cc57bef [Backtracing] Rename _Backtracing to Runtime.
Move the backtracing code into a new Runtime module.  This means renaming
the Swift Runtime's CMake target because otherwise there will be a name
clash.

rdar://124913332
2025-01-17 10:09:36 +00:00
Michael Gottesman
cb2d7560a4 [rbi] Fix demangling of sending results.
The issue here is that the demangler (since we have a postfix mangling) parses
parameters/results/etc and then uses earlier postfix type arguments to attach
the relevant types to the parameters/results/etc. Since the flag for a sending
result was placed in between the parameters and results, we get an off by one
error.

Rather than fix that specific issue by introducing an offset for the off by one
error, I used the fact that the impl-function part of the mangling is not ABI
and can be modified to move the bit used to signify a sending result to before
the parameters so the whole problem is avoided.

I also while I was doing this looked through the sending result mangling for any
further issues and fixed them as I found them.

rdar://141962865
2025-01-14 15:38:02 -08:00
John McCall
fa932e736c Fix the demangling of sending result types when combined with isolation
Fixes the immediate problem, but the presence of demangling code in the
runtime means that we'll need a follow-up to fix the compiler so that it
doesn't try to use the demangler to materialize metadata for function types
that have both isolation and a sending result.

rdar://142443925
2025-01-10 21:11:45 -05:00
Anthony Latsis
062061e37a Merge pull request #78235 from AnthonyLatsis/aloe-vera
Sema: Minor adjustment to `BindingSet` dumping
2025-01-04 15:13:10 +00:00
Anthony Latsis
a6e5e19512 Sema: Minor adjustment to BindingSet dumping
Shorten some of the keys and format them consistently as sentence
fragments rather than identifiers.
2025-01-04 11:27:54 +00:00
eeckstein
aed60d6740 Merge pull request #78403 from eeckstein/borrow-scope-doc
docs: add a section about borrow scopes in SIL.md
2025-01-03 08:02:56 +01:00
Erik Eckstein
1753c81ce3 docs: add a section about borrow scopes in SIL.md 2025-01-02 17:12:42 +01:00
NinjaLikesCheez
fc3c18b3b4 [doc] Fix links to SIL documentation in docs/README.md 2024-12-16 15:26:03 +01:00
Egor Zhdan
c75507511c [docs] Remove duplicated paragraph in the Testing guide 2024-12-03 19:29:15 +00:00
Kuba Mracek
23cfca22d0 [embedded] Explain new prefix in docs, fix comments 2024-12-02 15:01:24 -08:00
Jamie
e9b131af81 [docs]: fix typo in compilation-model.tex 2024-11-26 04:43:37 -06:00
Erik Eckstein
2a335502c8 docs: Overhaul the documentation for SIL
With a focus on updating the documentation of Ownership SSA.

The main changes are:

* Created a new directory `docs/SIL` and  moved all SIL-related files into this directory.

* Converted `rst` files to markdown.

* Extracted sections from `SIL.md` which go into very much detail - including the instruction reference - into separate files: `Types.md`, `Ownership.md`, `FunctionAttributes.md`, `Instructions.md`. Those files are referenced from `SIL.md` at the relevant places.

* Rewrote and updated the OSSA part in `SIL.md`

* Removed a few sections, which are not relevant anymore, like "Value dependency" (which is replaced by ownership concepts).

* Fixed and improved a lot of small things.
2024-11-21 08:50:20 +01:00
Andrew Trick
7255c412c2 SIL.rst: mark_dependence: minor typo and reformatting 2024-11-18 22:02:44 -08:00
Slava Pestov
7ad160a971 docs: Update generics.tex
Overhaul the "Conformance Paths" chapter to use the new notation
for derived requirements.
2024-11-16 22:05:52 -05:00
Konrad `ktoso` Malawski
45d15d1268 Merge pull request #76460 from finagolfin/ndk27 2024-11-15 17:50:40 +09:00
John Hui
cc8c5bb01e [doc] Fix typo in shell command from Getting Started guide (#77634) 2024-11-15 00:42:01 -08:00