mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend] Use experimental feature for layout prespecializations (#61451)
This commit is contained in:
@@ -162,7 +162,8 @@ set(SWIFT_BENCH_MODULES
|
||||
single-source/RomanNumbers
|
||||
single-source/SIMDRandomMask
|
||||
single-source/SIMDReduceInteger
|
||||
single-source/SimpleArraySpecialization
|
||||
# Disabled while layout prespecializations are experimental
|
||||
#single-source/SimpleArraySpecialization
|
||||
single-source/SequenceAlgos
|
||||
single-source/SetTests
|
||||
single-source/SevenBoom
|
||||
@@ -216,7 +217,8 @@ endif()
|
||||
|
||||
set(BENCH_LIBRARY_MODULES
|
||||
utils/TestsUtils
|
||||
utils/SimpleArray
|
||||
# Disabled while layout prespecializations are experimental
|
||||
#utils/SimpleArray
|
||||
)
|
||||
|
||||
set(BENCH_DRIVER_LIBRARY_MODULES
|
||||
|
||||
@@ -10,6 +10,8 @@ unsupportedTests.insert("ObjectiveCBridging")
|
||||
unsupportedTests.insert("ObjectiveCBridgingStubs")
|
||||
#endif
|
||||
|
||||
unsupportedTests.insert("SimpleArraySpecialization")
|
||||
|
||||
//===---
|
||||
// Single Source Libraries
|
||||
//
|
||||
@@ -78,7 +80,7 @@ var multiSourceLibraries: [(parentSubDir: String, name: String)] = multiSourceLi
|
||||
|
||||
var products: [Product] = []
|
||||
products.append(.library(name: "TestsUtils", type: .static, targets: ["TestsUtils"]))
|
||||
products.append(.library(name: "SimpleArray", type: .static, targets: ["SimpleArray"]))
|
||||
//products.append(.library(name: "SimpleArray", type: .static, targets: ["SimpleArray"]))
|
||||
products.append(.library(name: "DriverUtils", type: .static, targets: ["DriverUtils"]))
|
||||
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
|
||||
products.append(.library(name: "ObjectiveCTests", type: .static, targets: ["ObjectiveCTests"]))
|
||||
@@ -97,12 +99,13 @@ products += multiSourceLibraries.map {
|
||||
|
||||
var targets: [Target] = []
|
||||
targets.append(.target(name: "TestsUtils", path: "utils", sources: ["TestsUtils.swift"]))
|
||||
targets.append(.target(
|
||||
name: "SimpleArray",
|
||||
path: "utils",
|
||||
sources: ["SimpleArray.swift"],
|
||||
swiftSettings: [.unsafeFlags(["-Xfrontend",
|
||||
"-enable-experimental-layout-prespecialization"])]))
|
||||
// targets.append(.target(
|
||||
// name: "SimpleArray",
|
||||
// path: "utils",
|
||||
// sources: ["SimpleArray.swift"],
|
||||
// swiftSettings: [.unsafeFlags(["-Xfrontend",
|
||||
// "-enable-experimental-feature",
|
||||
// "LayoutPrespecialization"])]))
|
||||
targets.append(.systemLibrary(name: "LibProc", path: "utils/LibProc"))
|
||||
targets.append(
|
||||
.target(name: "DriverUtils",
|
||||
@@ -136,7 +139,7 @@ targets.append(
|
||||
publicHeadersPath: "."))
|
||||
#endif
|
||||
|
||||
var singleSourceDeps: [Target.Dependency] = [.target(name: "TestsUtils"), .target(name: "SimpleArray")]
|
||||
var singleSourceDeps: [Target.Dependency] = [.target(name: "TestsUtils"), /* .target(name: "SimpleArray") */]
|
||||
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
|
||||
singleSourceDeps.append(.target(name: "ObjectiveCTests"))
|
||||
#endif
|
||||
@@ -154,9 +157,7 @@ targets += singleSourceLibraries.map { name in
|
||||
return .target(name: name,
|
||||
dependencies: singleSourceDeps,
|
||||
path: "single-source",
|
||||
sources: ["\(name).swift"],
|
||||
swiftSettings: [.unsafeFlags(["-Xfrontend",
|
||||
"-enable-experimental-layout-prespecialization"])])
|
||||
sources: ["\(name).swift"])
|
||||
}
|
||||
|
||||
targets += cxxSingleSourceLibraries.map { name in
|
||||
|
||||
@@ -354,8 +354,9 @@ function (swift_benchmark_compile_archopts)
|
||||
set(common_options
|
||||
"-c"
|
||||
"-target" "${target}"
|
||||
"-${BENCH_COMPILE_ARCHOPTS_OPT}" ${PAGE_ALIGNMENT_OPTION}
|
||||
"-Xfrontend" "-enable-experimental-layout-prespecialization")
|
||||
"-${BENCH_COMPILE_ARCHOPTS_OPT}" ${PAGE_ALIGNMENT_OPTION})
|
||||
#"-Xfrontend" "-enable-experimental-feature"
|
||||
#"-Xfrontend" "LayoutPrespecialization")
|
||||
|
||||
if(SWIFT_BENCHMARK_GENERATE_DEBUG_INFO)
|
||||
list(APPEND common_options "-g")
|
||||
|
||||
@@ -165,7 +165,7 @@ import SequenceAlgos
|
||||
import SetTests
|
||||
import SevenBoom
|
||||
import Sim2DArray
|
||||
import SimpleArraySpecialization
|
||||
//import SimpleArraySpecialization
|
||||
import SortArrayInClass
|
||||
import SortIntPyramids
|
||||
import SortLargeExistentials
|
||||
@@ -349,7 +349,7 @@ register(SequenceAlgos.benchmarks)
|
||||
register(SetTests.benchmarks)
|
||||
register(SevenBoom.benchmarks)
|
||||
register(Sim2DArray.benchmarks)
|
||||
register(SimpleArraySpecialization.benchmarks)
|
||||
//register(SimpleArraySpecialization.benchmarks)
|
||||
register(SortArrayInClass.benchmarks)
|
||||
register(SortIntPyramids.benchmarks)
|
||||
register(SortLargeExistentials.benchmarks)
|
||||
|
||||
Reference in New Issue
Block a user