Commit Graph

195377 Commits

Author SHA1 Message Date
eeckstein
78aacd67b4 Merge pull request #85569 from eeckstein/fix-licm
LoopInvariantCodeMotion: don't reuse existing instructions in the loop pre-header
2025-11-19 20:59:43 +01:00
Arnold Schwaighofer
3292aaa618 IRGen: Detect nested generic types during generation of the vwt of specialized metadata
The previous code would not detect Container<T>.NonFixed but only NonFixed<T>.
For code size reasons we want to use the generic value witness functions rather than specialized ones in specialized metadata.
2025-11-19 11:30:09 -08:00
Arnold Schwaighofer
9b7dafbcb1 Test case 2025-11-19 11:26:49 -08:00
Saleem Abdulrasool
a1786258d6 utils: clean up static library elision
When building just the dynamic variants of the SDK, we would fail due to
the subdirectory not existing. This allows us to proceed silently in the
case.
2025-11-19 11:13:27 -08:00
Sam Pyankov
480b64ef50 ModuleInterface: Avoid printing generic arguments of a ParameterizedProtocolType in inheritance clause
When emitting module interfaces, parameterized protocols in inheritance clauses were being printed with generic arguments (public struct T: Fancy<Float64>), causing errors with protocol conformance verification.
The fix strip ParameterizedProtocolType to its base protocol type when printing inherited types, producing the correct inheritance clause.

Resolves: rdar://161925627
2025-11-19 10:27:15 -08:00
Charles Zablit
f76be65c3c Merge pull request #85429 from charles-zablit/charles-zablit/update-checkout/add-readme
[update-checkout] add a README
2025-11-19 18:58:02 +01:00
Charles Zablit
5bc3abe8b8 Merge pull request #85428 from charles-zablit/charles-zablit/update-checkout/script-cleanup
[update-checkout] remove unused test and finalize `utf-8` encoding refactor
2025-11-19 18:54:28 +01:00
Michael Gottesman
ef3298e44e [docs] Add some information to DebuggingTheCompiler.md about working with the various simulators.
I am adding this since I had to go spelunking around to find the SIMCTL_CHILD_
prefix which I need to debug an app. Rather than just forgetting it again, I
thought it made sense to just document it here so I can forget it again. I also
put in a little bit of other stuff about simctl as well while I was here.
2025-11-19 09:44:47 -08:00
Dario Rexin
7b02395192 Merge pull request #85566 from drexin/wip-163794474
[Test] Make IRGen/coroutine_accessors.swift more resilient against co…
2025-11-19 08:27:02 -08:00
Dario Rexin
c94d85ccfa Merge pull request #85567 from drexin/wip-164236484
[Test] Fix test/IRGen/builtins.swift for arm64e
2025-11-19 08:26:19 -08:00
Aidan Hall
ea0f86ed29 Merge pull request #85408 from aidan-hall/164256638
Only print SIL before sub-passes of selected passes with -sil-print-every-subpass
2025-11-19 15:25:50 +00:00
Slava Pestov
ca0f310242 IRGen: Remove unsafe usage of static variable
We cannot use 'static' linkage for something that points into the
ASTContext, because there might be more than one ASTContext in a
single process.

Also, fix the spelling mistake in a related function name.
2025-11-19 10:19:18 -05:00
Slava Pestov
6c1a2df419 IRGen: LinkEntity::Kind::DifferentiabilityWitness is not a type kind
As the above comments imply, when isTypeKind() returns true, then
getType() should return a valid Type. This wasn't true with
DifferentiabilityWitness.
2025-11-19 10:19:18 -05:00
Dave Inglis
e0f50c891a Merge pull request #85575 from charles-zablit/charles-zablit/windows/fix-arm64-build-python
[windows] remove pip installation
2025-11-19 09:24:22 -05:00
Slava Pestov
058bacf255 Update docs/README.md
Co-authored-by: Charles Zablit <c_zablit@apple.com>
2025-11-19 07:16:44 -05:00
Saleem Abdulrasool
b0bfaa417c utils: avoid rebuilding swift-system
Ensure that we pass along swift-system to swift-subprocess when building
to avoid the re-cloning and re-building of the dependency. This should
reduce any potential bloat and build time costs.
2025-11-18 22:08:28 -08:00
Slava Pestov
e5a713465d docs: Remove dead link
I took down my medium.com blog a few years ago, and all of the same material
in this post is now found in "Compiling Swift Generics", in docs/Generics/.
2025-11-18 21:55:25 -05:00
Xi Ge
443237860c Merge pull request #85549 from nkcsgexi/private-predicate-check
CustomAvailability: synthesized dynamic availability checking function should be private
2025-11-18 18:52:13 -08:00
Slava Pestov
a3ecbc8202 Re-organize docs/README.md
Also remove links to stuff that's extremely out of date at this point.
It's still all there in docs/ if you want to see it, but there's no
longer any reason to feature it so prominently at the top of the
README.
2025-11-18 21:50:44 -05:00
Kuba (Brecka) Mracek
6013e9d7a5 Merge pull request #85423 from kubamracek/section-static-funcs
Allow referencing static functions in @section expressions
2025-11-18 17:30:14 -08:00
Daniil Kovalev
5bd3d80ec9 Fix build 2025-11-19 04:15:52 +03:00
Kavon Farvardin
7e9608cccc Doc: small fixes for Escapable explainer
Thanks to a review from @amartini51

Co-authored-by: Alex Martini <amartini@apple.com>
2025-11-18 15:14:38 -08:00
Charles Zablit
77627f37f9 [windows] remove pip installation 2025-11-18 23:47:28 +01:00
Kavon Farvardin
55eaed524e Doc: add explainer for Escapable
resolves rdar://146331729
2025-11-18 14:36:29 -08:00
Adrian Prantl
5cc8264d8d Merge pull request #80041 from gooichi/swift-project-settings
[swift-project-settings] require flymake-proc
2025-11-18 13:19:40 -08:00
Erik Eckstein
50c299e0bf LoopInvariantCodeMotion: don't reuse existing instructions in the loop pre-header
This is wrong for hoisted load instructions because we don't check for aliasing in the pre-header.
And for side-effect-free instructions it's not really necessary, because that can cleanup CSE afterwards.

Fixes a miscompile
rdar://164034503
2025-11-18 21:23:13 +01:00
Arnold Schwaighofer
17447a3378 Merge pull request #85551 from aschwaighofer/wip_embedded_exit
Preliminary support for existential in embedded Swift
2025-11-18 15:10:40 -05:00
Dario Rexin
c7aa2df73e [Test] Fix test/IRGen/builtins.swift for arm64e
rdar://164236484

Added optional .ptrauth suffix to make the test pass on arm64e
2025-11-18 11:56:06 -08:00
Daniil Kovalev
c0935fcca1 Fix build 2025-11-18 22:50:44 +03:00
Hamish Knight
4992c7ab8b Merge pull request #85538 from hamishknight/binding-fixes
[Sema] A couple of binding-related crasher fixes
2025-11-18 19:48:25 +00:00
Dario Rexin
a8bddeedb8 [Test] Make IRGen/coroutine_accessors.swift more resilient against code gen changes
rdar://163794474

The sequence number in duplicate symbol names is not relevant for the test, so we should not check for the specific number
2025-11-18 11:41:57 -08:00
Egor Zhdan
4234fb7358 Merge pull request #85340 from egorzhdan/egorzhdan/revert-cs-std-string
Revert "[ConstraintSystem] C++ Interop: Binding a string literal to `std.string` shouldn't increase the score"
2025-11-18 18:51:12 +00:00
Saleem Abdulrasool
f4a60df6ea build: explicitly error out if -print-target-info fails
Rather than trying to silently continue, catch an execution error and
report it to the user. There is no possible recovery at this point.
2025-11-18 10:01:39 -08:00
Saleem Abdulrasool
158729c9db Merge pull request #85541 from compnerd/dependency
test: remove stdlib unittest dependency for tests
2025-11-18 09:56:46 -08:00
Steven Wu
e519e59acc Merge pull request #85547 from cachemeifyoucan/eng/PR-164903080
Revert "[Caching][NFC] Using llvm::cas::CASConfiguration"
2025-11-18 09:43:41 -08:00
Dave Lee
b6b477de58 [Debug] Add pointer based stringForPrintObject (#84742)
Adds an overload of `_DebuggerSupport.stringForPrintObject` which takes a pointer and mangled typename as arguments. This will be used to improve performance and resilience of `po` in lldb.

The pointer and mangled typename are used to construct an `Any` value, which is then passed into the primary implementation of `stringForPrintObject`.

This allows calling `stringForPrintObject` without having to first construct a context that contains all necessary Swift modules. This will improve speed, and also resilience when modules cannot be loaded for whatever reason.

rdar://158968103
2025-11-18 09:32:28 -08:00
Steven Wu
b56f541732 Merge pull request #85499 from cachemeifyoucan/eng/PR-164409895
[Caching] Fix multi-threaded WMO with MCCAS
2025-11-18 09:22:13 -08:00
Kavon Farvardin
e5f0ac6398 OpaqueValues: ensure no-implicit-copy captures are correct 2025-11-18 09:21:57 -08:00
Xi Ge
d144524209 CustomAvailability: synthesized dynamic availability checking function should be private
When compiling a Swift module in incremental mode, each Swift source file is compiled into an object file
and we use linker to link them together. Because the predicate function for checking dynamic feature
availability is eagerly synthesized per compilation unit, the linker will complain about duplicated
symbols for them. Setting their visibility as private ensures that linker doesn't see them, thus addressing
the linker errors.

One workaround for this problem is to enable WMO.

rdar://164971313
2025-11-18 09:19:26 -08:00
Adrian Prantl
5c3a26633a Merge pull request #85519 from adrian-prantl/unregister-api
[LLDB] Add an API for unregistering MemoryBuffer modules (NFC)
2025-11-18 08:27:05 -08:00
Aidan Hall
d945dc4e0b Merge pull request #85491 from aidan-hall/disable-pack-specialization
SILOptimizer: Disable PackSpecialization pass until it has been properly fixed.

rdar://164515160
2025-11-18 15:34:22 +00:00
Alastair Houghton
748ba05161 [Concurrency][Tests] Bump availability in a couple of tests.
Since we've bumped availability elsewhere, we need to bump these
tests also.
2025-11-18 12:08:46 +00:00
Anthony Latsis
e62153187a Merge pull request #85487 from swiftlang/jepa-main4
AST: Properly disallow isa/cast/dyn_cast on `Type`
2025-11-18 07:35:46 +00:00
AZero13
5c6f34163b Fix copy-paste error of calculation of suspending time in Clock.cpp (#85545)
We should be assigning the value to suspension, not continuous!
2025-11-17 22:11:35 -08:00
Tim Kientzle
a271eb2bb7 Merge pull request #85544 from tbkka/tbkka-Issue85539
Properly initialize buffer when called via legacy ABI
2025-11-17 19:50:07 -08:00
Saleem Abdulrasool
79c234b725 Merge pull request #85542 from swiftlang/revert-85534-revert-71422-docc
Revert "Revert "build: setup a CMake based build for DocC""
2025-11-17 19:48:24 -08:00
Kuba Mracek
b409e551c4 Allow referencing static functions in @section expressions 2025-11-17 19:43:34 -08:00
Kuba (Brecka) Mracek
5f578adb3d Merge pull request #85530 from kubamracek/section-closures
SE-0492: Add support for closures (with no captures) into @section expressions
2025-11-17 19:29:49 -08:00
Arnold Schwaighofer
a725de5ba6 Address review comments 2025-11-17 15:52:00 -08:00
Michael Gottesman
27dc291c88 Merge pull request #85520 from gottesmm/pr-3347fe62df76bb72f5f1bb27d446618b521580db
[irgen] Make AsyncLetBegin and AsyncLetFinish UNKNOWN_MEMEFFECTS instead of ArgMemOnly.
2025-11-17 15:47:43 -08:00