Commit Graph

18 Commits

Author SHA1 Message Date
Slava Pestov
68b044abb8 Benchmarks: Set deployment target to Swift 5.5-era Apple OSes
We can probably bump this further, but at the very least this allows
the use of basic concurrency features.
2025-07-23 17:26:49 -04:00
Slava Pestov
56f6c09afd Benchmarks: Fix multi-source benchmarks
The swiftpm build was broken and it only worked if there was exactly
one multi-source benchmark. Use the correct subdirectory for each one.
2025-07-23 17:26:48 -04:00
Egor Zhdan
9f44e0d56b [cxx-interop] Build benchmarks with modern C++ interop flag
To build benchmarks that use C++ `std::span`, we need to use C++20 standard.

SwiftPM supports `.interoperabilityMode(.Cxx)` build setting starting from version 5.9. In more recent versions, SwiftPM is also able to correctly propagate the C++ standard version (e.g. `-Xcc -std=c++20`) to the Swift compiler invocation, when C++ interop is enabled. The C++ standard version is only propagated if the modern build setting is used. This has caused Linux CI failures in the past.

This change switches the package manifest to use the modern build setting to enable C++ interop.
2024-09-18 14:07:35 +01:00
smonteiro2
6ed0091630 [cxx-interop] Benchmarks for std::span in Swift
* std::span is not supported in swift-ci linux
* explicitly pass -std=c++20 in Package.swift: rdar://136138941
2024-09-17 17:48:56 +01:00
smonteiro2
282b1ba942 [cxx-interop] pass -std=c++20 to configurations using std::span
When the benchmarks are built with SwiftPM, the -std=c++20 flag is passed if the -cxx-interoperability-mode is present. This patch switches from -Xfrontend -enable-experimental-cxx-interop to the required interoperability flag.
2024-09-02 18:53:31 +01:00
Egor Zhdan
f1ca417da6 [cxx-interop] Run benchmarks in C++20 mode
This will allow benchmarking Swift access to `std::span` which is a C++20 feature and therefore requires compiling with `-Xcc -std=c++20`.
2024-07-23 12:30:17 +01:00
Alex Lorenz
d72b592eeb [cxx-interop] Add initial benchmark to compare vector<uint32_t> sum in C++ vs Swift 2022-10-10 09:13:31 -07:00
Dario Rexin
992cae456b [Frontend] Use experimental feature for layout prespecializations (#61451) 2022-10-06 15:21:01 -07:00
Dario Rexin
210c68d8aa [SILOptimizer] Add prespecialization for arbitray reference types (#58846)
* [SILOptimizer] Add prespecialization for arbitray reference types

* Fix benchmark Package.swift

* Move SimpleArray to utils

* Fix multiple indirect result case

* Remove leftover code from previous attempt

* Fix test after rebase

* Move code to compute type replacements to SpecializedFunction

* Fix ownership when OSSA is enabled

* Fixes after rebase

* Changes after rebasing

* Add feature flag for layout pre-specialization

* Fix pre_specialize-macos.swift

* Add compiler flag to benchmark build

* Fix benchmark SwiftPM flags
2022-09-22 16:29:01 -07:00
zoecarver
839839f924 [cxx-interop] Rename enable-cxx-interop -> enable-experimental-cxx-interop.
Also removes the driver flag, this will now also always be guarded on `-Xfrontend`.
2022-04-07 19:15:25 -07:00
zoecarver
01b12cfe6e [cxx-interop] Add support for benchmarks with C++ interop.
* Adds support for benchmarks that use C++ modules.
* Adds "CreateObjects" benchmark that creates C++ objects.
2020-10-06 19:33:22 -07:00
Karoy Lorentey
c1bf5c9224 [benchmark] Fix thinko 2020-04-13 19:46:44 -07:00
Karoy Lorentey
03e4f5f24b [benchmark] Package.swift: Don’t trap on stray files under single-source/ 2020-03-23 18:17:47 -07:00
Michael Gottesman
33684ba508 Add support for compiling ObjectiveCNoBridgingStubs to the swiftpm benchmark build.
We did not have access to something like SwiftSettings.unsafeFlags to
pass -disable-swift-bridge-attr to swift.
2019-11-26 10:00:08 -08:00
Michael Gottesman
dcb495d0db [benchmark] Refactor out how we specify benchmarks in Package.swift so downstream we can add additional source folders.
This is just a useful thing if one wants to have a separate folder of down
stream benchmarks. The code is written like this to hopefully prevent merge
conflicts from happening.
2019-07-18 23:19:28 -07:00
Michael Gottesman
ba7815b663 [benchmark] Fix swiftpm based benchmark build on Linux. 2018-10-29 12:15:20 -07:00
Michael Gottesman
7d58b40a96 [benchmark] Fix the swiftpm based benchmark build.
This does a few things:

1. We were not updated for libProc's addition. I bumped the swiftpm version
number to get the systemLibrary functionality (thanks Ankit).

2. I split up a bunch of lines to help the typechecker out a little bit.
2018-10-28 15:50:38 -07:00
Michael Gottesman
0a70ec336a [benchmark] Add swiftpm support for the benchmark suite.
This means that we can now edit benchmarks in Xcode! Keep in mind:

1. This is not an official build. It is just so we can use Xcode to edit files
and get IDE features.
2. I had to do a little hackery to keep the build the way it is today where all
single-source files are their own modules.
3. As long as we do not change the directory structure, everything should just
update and work since I added a little code that dynamically adds the tests.

Also, to do this I had to rename multi-source/PrimsSplit/main.swift =>
Prims_main.swift. That is because the name main.swift is special in some way and
I hit linker errors. By simply changing the name from main.swift =>
Prims_main.swift, everything is good. I am going to file a separate bug for
that.
2018-06-03 23:50:27 -07:00