Commit Graph

1615 Commits

Author SHA1 Message Date
Steven Wu
fba8ec3292 [CAS] Make CAS plugin options to be cache invariant
Do not add CAS configurations into cache key computation. This ensure if
the cache keys are identical if two functionally equivalent plugins are
used. This is safe to do because if any of the CAS configurations
changes how the cache key is computed, they are going to be directly
reflected in the cache key without adding its configuration into the
key.

rdar://137091843
2024-10-02 14:07:32 -07:00
Steven Wu
cd07d532af [CAS] Use IncludeTreeFileList instead of full CASFS for caching
Use IncludeTreeFileList instead of full feature CASFS for swift
dependency filesystem. This allows smaller CAS based VFS that is smaller
and faster. This is enabled by the CAS enabled compilation does not
need to iterate file system.

rdar://136787368
2024-09-30 16:01:33 -07:00
swift-ci
a655fe5edc Merge remote-tracking branch 'origin/main' into rebranch 2024-09-27 09:56:29 -07:00
Steven Wu
7adaf50e7f [PrefixMap] Make sure blocklists are remapped in interface compilation
Make sure blocklists are remapped for interface compilation. The main
module blocklist remap is done by swift-driver and do not need to be
handled in scanner.
2024-09-26 17:02:10 -07:00
Ben Barham
c15bc19946 Merge remote-tracking branch 'origin/main' into main-to-rebranch
Conflicts:
  - `lib/Serialization/ModuleFileSharedCore.cpp` new headers on main
2024-09-26 16:01:56 -07:00
Doug Gregor
0aff85ced7 Emit mangled names for public symbols into the .swiftinterface
When the frontend option `-abi-comments-in-module-interface` is provided
during interface printing, the printed interface will contain
additional comments that provide the mangled names for public symbols.
This is an experiment in seeing how much information we can
meaningfully extract from a printed Swift interface for the purpose of
bridging with other languages.
2024-09-25 15:49:34 -07:00
swift-ci
753b917274 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-25 05:36:07 -07:00
Slava Pestov
c77fae3a2d Basic: Add -fine-grained-timers flag
By default, -stats-output-dir does not collect per-request timers and
counters, because of overhead.
2024-09-23 18:04:25 -04:00
swift-ci
a0097bde91 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-21 11:14:00 -07:00
Saleem Abdulrasool
dacdb8fab2 Merge pull request #76577 from compnerd/undent
Remove `swift-indent` tool
2024-09-21 10:57:41 -07:00
swift-ci
ec742a3482 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-20 10:54:04 -07:00
Arnold Schwaighofer
b49e30c01b IRGen: Add an option to force emission of an async context pointer on the stack for leaf funclets
`-Xfrontend -enable-async-frame-pointer-all`

rdar://135746607
2024-09-19 12:28:57 -07:00
Saleem Abdulrasool
6443619126 Remove swift-indent tool
This removes the implementation of the `swift-indent` tool, its
associated documentation, and utilities. This tool was never completed
and has much better alternatives with `swift-format` which is more
flexible and actually maintained.
2024-09-19 11:21:59 -07:00
Ben Barham
a7b50f357f Merge remote-tracking branch 'origin/main' into manual-main-merge
Conflicts:
  - `lib/Driver/ToolChains.cpp` conflicting with the `addAllArgs` rename
    for multiple options
2024-09-16 13:53:18 -07:00
Artem Chikin
6990b89ec2 Merge pull request #72854 from artemcm/DefaultParallelDepScan
[Dependency Scanning] Enable parallel dependency scanning by-default
2024-09-13 14:30:01 -07:00
Ellie Shin
db2a4df6e1 Merge pull request #76450 from swiftlang/elsh/re-revert-pkg-name-pr
Revert "Revert "Do not print package-name in non-package interface by…
2024-09-13 12:53:59 -07:00
Arnold Schwaighofer
8e9cd5db68 Merge pull request #76150 from aschwaighofer/async_entry_ret_metadata
IRGen: Add metadata for async funclets denoting frame entry and frame exists
2024-09-13 11:52:00 -07:00
elsh
60f1ea4f85 Revert "Revert "Do not print package-name in non-package interface by default.""
This reverts commit 4b8e76fbeb.
2024-09-13 08:20:50 -07:00
Kavon Farvardin
ba0aac3f39 Merge pull request #76093 from kavon/coldsplit-2
ColdBlockInfo: overhaul analysis pass
2024-09-12 16:06:07 -07:00
Doug Gregor
b272a05ea9 Merge pull request #76363 from DmT021/wp/print-diagnostic-groups
[Diagnostics] Add -print-diagnostic-groups flag
2024-09-11 13:04:07 -07:00
Dmitrii Galimzianov
a8b71ea97f Add -print-diagnostic-groups flag
This change adds the `-print-diagnostic-groups` flag as described by SE-0443.
2024-09-11 13:34:42 +02:00
Rintaro Ishizaki
854298ab3b Merge pull request #76360 from rintaro/parser-validation-swiftmodule
Make -disable-experimental-parser-round-trip a module interface option
2024-09-09 21:13:26 -07:00
Alexis Laferrière
8d28ed4fa9 Merge pull request #76269 from xymus/public-module-name
Diagnostics: Intro the public module name concept to hide support modules from clients
2024-09-09 16:57:12 -07:00
Rintaro Ishizaki
0055818857 Make -disable-experimental-parser-round-trip a module interface option
When building .swiftmodule from .swiftinterface,
`disable-experimental-parser-round-trip` should be applied if the
interface file with build with the flag.
2024-09-09 16:52:59 -07:00
Doug Gregor
08e339b7b4 Merge pull request #74466 from DmT021/wp/no-warning-as-error
[Diagnostics] Add -no-warning-as-error to except a specific warning from being treated as an error
2024-09-09 09:35:05 -07:00
Dmitrii Galimzianov
070c77ebcf fixup! [Diagnostics] Add -[no-]warning-as-error flags for precise control over warning behavior 2024-09-07 07:55:27 +02:00
Dmitrii Galimzianov
28883b6654 [Diagnostics] Add -[no-]warning-as-error flags for precise control over warning behavior
This commit adds new compiler options -no-warning-as-error/-warning-as-error which allows users to specify behavior for exact warnings and warning groups.
2024-09-07 01:14:43 +02:00
swift-ci
4d79855f9e Merge remote-tracking branch 'origin/main' into rebranch 2024-09-06 09:54:13 -07:00
Xi Ge
f1d2da16dd Merge pull request #76304 from swiftlang/revert-76244-elsh/do-not-print-package-name
Revert "Do not print package-name in non-package interface by default."
2024-09-06 09:34:16 -07:00
swift-ci
c728b0912d Merge remote-tracking branch 'origin/main' into rebranch 2024-09-06 05:54:43 -07:00
Egor Zhdan
5490c5045f Merge pull request #76280 from swiftlang/egorzhdan/remove-cxx-stdlib-flag
[cxx-interop] Remove `-experimental-cxx-stdlib` flag
2024-09-06 13:40:48 +01:00
swift-ci
8409baf783 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-06 00:41:00 -07:00
Pavel Yaskevich
d53b1c48ec Merge pull request #75564 from dempseyatgithub/0441-language-mode-flag
SE-0441: Add language-mode option with alias to swift-version
2024-09-06 00:23:49 -07:00
Xi Ge
4b8e76fbeb Revert "Do not print package-name in non-package interface by default." 2024-09-05 21:36:32 -07:00
Alexis Laferrière
c70162c703 Merge branch 'main' into public-module-name 2024-09-05 20:02:07 -07:00
swift-ci
da976d89b3 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-05 15:55:01 -07:00
Alexis Laferrière
0be1dcc09d ModuleInterface: make -public-module-name an ignorable flag 2024-09-05 10:57:25 -07:00
Egor Zhdan
2df1b6fee4 [cxx-interop] Remove -experimental-cxx-stdlib flag
This flag was added back in 2020, but it didn't function properly, since a lot of other code in the compiler assumed the platform-default C++ stdlib until recently (https://github.com/swiftlang/swift/pull/75589).

The recommended way to use a non-default C++ stdlib in Swift now is to pass `-Xcc -stdlib=xyz` argument to the compiler.

This change removes the `-experimental-cxx-stdlib` flag.
2024-09-05 15:19:19 +01:00
Alexis Laferrière
3fe97c2eb8 Frontend: Intro -public-module-name flag
Introduce the concept of public facing module name designed to hide support module from external clients. This name should be set on a support module that is an implementation detail of a public module, the public module name of the support module should be the name of the public module. For example, BigKitCore’s public module name can be set to BigKit for diagnostics to refer to both modules as BigKit.

This name is used to refer to the support module in diagnostics for external clients. We determine if a client is external if they also import the module identified by the public module name. If a client doesn’t import the public module, diagnostics will always use the real name of the module.

The public module name is set with the flag -public-module-name and it's preserved in textual swiftinterfaces and binary swiftmodules.

rdar://134527933
2024-09-04 16:20:06 -07:00
elsh
640b1252fc Do not print package-name in non-package interface by default.
Having package-name printed in public or private interface led to strange dependency errors in the past. For example, an SPI module is a dependency within a package, but due to the package-name being printed in public or private interface, dependency scanner tries to find it even for an external client of the package, causing a `no such module found` error. The  -disable-print-package-name-for-non-package flag helps with such case, but to enforce the correct behavior, we should make it a default to not print package-name in public or private interface.

Resolves rdar://135260270
2024-09-04 02:40:19 -07:00
Kavon Farvardin
7203a4fa73 ColdBlockInfo: overhaul analysis pass
The old analysis pass doesn't take into account profile data, nor does
it consider post-dominance. It primarily dealt with _fastPath/_slowPath.

A block that is dominated by a cold block is itself cold. That's true
whether it's forwards or backwards dominance.

We can also consider a call to any `Never` returning function as a
cold-exit, though the block(s) leading up to that call may be executed
frequently because of concurrency. For now, I'm ignoring the concurrency
case and assuming it's cold. To make use of this "no return" prediction,
use the `-enable-noreturn-prediction` flag, which is currently off by
default.
2024-09-03 15:41:10 -07:00
Arnold Schwaighofer
eaf90dff38 IRGen: Add metadata for async funclets denoting frame entry and frame exists
Adds sections `__TEXT,__swift_as_entry`, and `__TEXT,__swift_as_ret` that
contain relative pointers to async functlets modelling async function entries,
and function returns, respectively.

Emission of the sections can be trigger with the frontend option
`-Xfrontend -enable-async-frame-push-pop-metadata`.

This is done by:

* IRGen adding a `async_entry` function attribute to async functions.
* LLVM's coroutine splitting identifying continuation funclets that
  model the return from an async function call by adding the function
  attribute `async_ret`.  (see #llvm-project/pull/9204)
* An LLVM pass that keys off these two function attribute and emits the
  metadata into the above mention sections.

rdar://134460666
2024-09-03 08:44:16 -07:00
James Dempsey
99e3cea979 Add language-mode option with alias to swift-version 2024-08-19 12:14:57 -07:00
swift-ci
685fc0d215 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-14 05:14:24 -07:00
Ellie Shin
dc1c34dfa1 [Sema] Treat @usableFromInline package decls from interface as public and skip access checks
Resolves rdar://133319906
2024-08-13 17:01:19 -07:00
Ben Barham
467e528200 Merge remote-tracking branch 'origin/main' into manual-rebranch-merge
Conflicts:
  - `lib/Serialization/ModuleFormat.h` bumped version to account for
    differences between main and rebranch.
2024-08-09 15:22:39 -07:00
Kavon Farvardin
9d69f2bceb Merge pull request #75382 from kavon/static-branch-prediction
Throws Prediction + HotColdSplitting
2024-08-09 15:24:22 -04:00
Kavon Farvardin
11e8bb8759 IRGen: -enable-split-cold-code frontend feature 2024-08-09 12:09:29 -04:00
Kavon Farvardin
d373f6f604 NFC: throws prediction frontend flag 2024-08-08 11:18:22 -04:00
swift-ci
245fd5b7e8 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-05 09:14:23 -07:00