Commit Graph

4421 Commits

Author SHA1 Message Date
Karoy Lorentey
8663f07dd7 Apply edits in review
Co-authored-by: Guillaume Lessard <glessard@users.noreply.github.com>
2021-10-06 14:39:20 -07:00
Karoy Lorentey
1527cc7f08 [doc][stdlib] Apply review notes, expanding on description 2021-10-06 12:05:37 -07:00
Karoy Lorentey
d40c03f4bd [doc][stdlib] Tiny edits 2021-10-05 22:27:34 -07:00
Karoy Lorentey
e32db08319 [doc][stdlib] Expand the coding style section of the stdlib programmers manual
- Explain why we have such a short line length limit
- Expand a bit on line breaking conventions
- Add a section on how to present type definitions
2021-10-05 22:06:06 -07:00
Andrew Trick
87bf0e48ee Merge pull request #39566 from atrick/comment-ossa
Minor source and doc comments related to OSSA
2021-10-04 15:34:49 -07:00
Andrew Trick
2860ac1a55 Documentation cleanup for mark_function_escape. 2021-10-03 19:49:58 -07:00
Doug Gregor
62b2054aa1 Remove @_distributedActorIndependent attribute entirely.
All its uses have been subsumed into `nonisolated`.
2021-10-01 23:08:22 -07:00
Kuba (Brecka) Mracek
d6bc48acde Merge pull request #39313 from kubamracek/conditional
Implement conditional stripping of type descriptors, protocols and protocol conformances via !llvm.used.conditional
2021-10-01 09:18:41 -07:00
Kuba Mracek
d0e05003f5 For individual runtime records for types/protocols/conformances, add and use new mangling suffixes 2021-09-29 13:14:58 -07:00
Nate Chandler
07cc404aed [NFC] Tweaked doc for alloc_stack's lexical attr.
Thanks to Erik for catching this. The instruction doesn't have an
operand.  It creates storage.  The lexical attribute indicates that the
storage corresponds to a source-level variable.
2021-09-28 07:34:15 -07:00
Karoy Lorentey
6789441f15 [stdlib][doc] Update stdlib manual to reflect new availability guidelines 2021-09-22 12:24:53 -07:00
Andrew Trick
e85228491d Rename AccessedStorage to AccessStorage
to be consistent with AccessPath and AccessBase.

Otherwise, the arbitrary name difference adds constant friction.
2021-09-21 23:18:24 -07:00
Andrew Trick
6079cbe27c AccessBase documentation
Split the SIL function convention and memory access documentation into
separate documents. Reference them from SIL.rst.
2021-09-21 19:54:24 -07:00
Saleem Abdulrasool
e0959541fd Update WindowsBuild.md
Add workaround for newer CMake versions (ensuring that the MSVC mt is used instead of the LLVM one).  Additionally, add some libxml2 flags for when building with the new upstream CMake builds as opposed to the original ones referenced here.
2021-09-19 10:08:02 -07:00
nate-chandler
67aab4245d Merge pull request #39303 from nate-chandler/lexical_lifetimes/respell_defined_as_lexical
[SIL] Changed spelling of lifetime flags.
2021-09-16 13:30:51 -07:00
Robert Widmann
ec37074b1c Merge pull request #39290 from apple/neonichu-patch-1
Fix TOC entry for Linux in GettingStarted
2021-09-14 11:28:02 -07:00
Nate Chandler
f833b68d3b [SIL] Changed spelling of lifetime flags.
Changed the frontend flag to -enable-experimental-lexical-lifetimes from
-enable-experimental-defined-lifetimes.

Changed the attribute on begin_borrow from [defined] to [lexical].
2021-09-14 08:49:30 -07:00
nate-chandler
c3e762680e Merge pull request #39291 from nate-chandler/lexical_lifetimes/alloc_stack/lexical_flag
[SIL] Added lexical flag to alloc_stack.
2021-09-14 08:47:50 -07:00
Nate Chandler
b57b222b54 [SIL] Added lexical flag to alloc_stack.
The new flag will be used to track whether a borrow scope corresponds to
a source-level lexical scope.  Here, the flag is just documented, added
to the instruction, represented in textual and serialized SIL, and
cloned.
2021-09-13 17:14:28 -07:00
Boris Bügling
3053e6de67 Fix TOC entry for Linux in GettingStarted
The TOC was referencing a no longer existing "Ubuntu Linux" section.
2021-09-13 15:49:04 -07:00
Andrew Trick
4828285944 Add pointer_to_address [align=] option.
Support for addresses with arbitrary alignment as opposed to their
element type's natural in-memory alignment.

Required for bytestream encoding/decoding without resorting to memcpy.

SIL instruction flag, documentation, printing, parsing, serialization,
and IRGen.
2021-09-13 10:26:14 -07:00
Michael Gottesman
5590c7b526 [sil] Add a move_value instruction.
This is a new instruction that can be used by SILGen to perform a semantic move
in between two entities that are considered separate variables at the AST
level. I am going to use it to implement an experimental borrow checker.

This PR contains the following:

1. I define move_value, setup parsing, printing, serializing, deserializing,
   cloning, and filled in all of the visitors as appropriate.
2. I added createMoveValue and emitMoveValueOperation SILBuilder
   APIs. createMoveValue always creates a move and asserts is passed a trivial
   type. emitMoveValueOperation in contrast, will short circuit if passed a
   trivial value and just return the trivial value.
3. I added IRGen tests to show that we can push this through the entire system.

This is all just scaffolding for the instruction to live in SIL land and as of
this PR doesn't actually do anything.
2021-09-12 11:07:42 -07:00
Keith Smiley
75ccc66b9d Add note about --match-timestamp for bisects 2021-09-09 14:21:44 -07:00
Min-Yih Hsu
f97ef0bbb3 [doc] Update SIL.rst to reflect debug_value_addr deprecation
And restructure the "Debug Information" section to make it flow better.
2021-09-02 09:27:48 -07:00
swift-ci
e4f0815366 Merge pull request #38814 from varungandhi-apple/vg-aeic-lib-evo 2021-08-31 18:15:26 -07:00
nate-chandler
1aafbed97d Merge pull request #39050 from nate-chandler/lexical_lifetimes/borrow_scope_instruction_flag
[SIL] Added defined flag to begin_borrow.
2021-08-26 07:25:59 -07:00
Mishal Shah
9024f951c9 Update the Xcode version to Xcode 13 beta 4 2021-08-25 17:15:44 -07:00
Nate Chandler
f3b7706329 [SIL] Added defined flag to begin_borrow.
The new flag will be used to track whether a borrow scope corresponds to
a source-level lexical scope.  Here, the flag is just added to the
instruction and represented in textual and serialized SIL.
2021-08-25 16:41:49 -07:00
Robert Widmann
4b826b7d17 [Gardening] Document An ABI Breaking Case For Moving Extension Members 2021-08-23 08:37:11 -10:00
Varun Gandhi
4f69c2b5c3 [docs] Describe how _alwaysEmitIntoClient relates to library evolution. 2021-08-20 16:22:51 -07:00
Alastair Houghton
cd99995d84 [Tests] Re-add round-trip type test.
This was reverted in 12fa024 because it broke the iOS simulator build.

rdar://37170485
2021-08-17 09:51:22 +01:00
Mishal Shah
f45195454f Revert "[Tests] Add a test to round-trip types through mangled names." 2021-08-16 14:03:39 -07:00
Alastair Houghton
1cc1036ec9 Merge pull request #38649 from al45tair/problem/37170485
[Tests] Add a test to round-trip types through mangled names.
2021-08-16 14:21:38 +01:00
Alastair Houghton
8e12cd0b62 [Tests] Add a test to round-trip types through mangled names.
Added a new test to the test suite that round trips Swift types through
mangled names and checks that we get the same type back that we started
with.

rdar://37170485
2021-08-16 11:22:21 +01:00
Andrew Trick
1f64871b31 MemAccessUtils: unify Box/Class/Tail storage for consistency and usability
It was originally convenient for exclusivity optimization to treat
boxes specially. We wanted to know that the 'Box' kind was always
uniquely identified. But that's not really important. And now that
AccessedStorage is being used more generally, the inconsistency is
problematic.

A consistent model is also must easier to understand and explain.

This also make the implementation of the utility simpler and more powerful.

Functional changes:

isRCIdentical will look through mark_dependence and mark_uninitialized.

findReferenceRoot is used consistently everywhere increasing analysis precision.
2021-08-09 11:43:40 -07:00
Egor Zhdan
bdebe03a3c Merge pull request #38796 from egorzhdan/cxx-manifesto-void
Docs: fix a few examples in the C++ interop manifesto
2021-08-07 23:23:58 +03:00
Egor Zhdan
5570daf696 Docs: fix a few examples in the C++ interop manifesto
This change fixes the syntax in a few code snippets to make them valid Swift.
2021-08-07 20:17:12 +03:00
swift-ci
858f78bcce Merge pull request #38756 from TheHarcker/patch-2 2021-08-06 16:59:18 -07:00
Min-Yih Hsu
c3390ecbfa Merge pull request #38736 from mshockwave/dev-sil-diexpr-optimize
[SILOptimizer][DebugInfo] Preliminary support for DIExpression in SROA and Mem2Reg
2021-08-06 09:22:46 -07:00
Hans Harck Tønning
53e8311513 Fixed a typo in UnderscoredAttributes.md
Fixed an accidental past tense in the Underscored Attributes reference guide; “inherited” => “inherit”.
2021-08-05 00:18:38 +02:00
Min-Yih Hsu
e63632fda8 [DebugInfo][SIL] Introduce the 'implicit' attribute for debug variable
Debug variables that are marked 'implicit' on its `debug_value`
instruction mean that they were generated by compiler. Optimizers are
free to remove them (if it becomes a dead code, for instance) even in
-Onone. Since they are barely used by users and keeping them might lead
to incorrect IRGen results.
2021-08-04 12:56:35 -07:00
Varun Gandhi
8e23a7ba30 [docs] Fix broken link to OptimizerEffects doc. 2021-08-04 10:45:02 -07:00
Varun Gandhi
d66562c4cb Merge pull request #38729 from varungandhi-apple/vg-tweak-docs
[docs] Make some corrections and additions to UnderscoredAttributes.md
2021-08-04 03:34:21 -07:00
Varun Gandhi
585ba571e0 [docs] Minor cleanup and consistency fixes in UnderscoredAttributes.md. 2021-08-03 12:56:33 -07:00
Varun Gandhi
297bc92cf9 [docs] Add documentation for _assemblyVision. 2021-08-03 12:56:33 -07:00
YOCKOW
be35884a29 [docs] UnderscoredAttributes.md: Prettify code in @_hasStorage. 2021-08-03 15:36:29 +09:00
Varun Gandhi
f42bde346b [docs] Add documentation for underscored attributes. (#37854)
Fixes rdar://65258964.
2021-08-02 18:20:05 -07:00
Alastair Houghton
8918a09595 [Tests] Fix RemoteMirror/interop.swift to work with ASAN enabled.
In order to work for an ASAN build, parts of this test need themselves to be
built with ASAN turned on.

rdar://81274645
2021-07-29 18:27:11 +01:00
Michael Gottesman
f432bd9416 Merge pull request #36094 from zoecarver/bump-cmake-req
Bump CMake version to 3.19.6.
2021-07-24 15:37:18 -07:00
Min-Yih Hsu
5a42c27826 Merge pull request #38378 from mshockwave/dev-sil-diexpression
[DebugInfo] Adding DIExpression into SIL
2021-07-22 13:19:24 -07:00