Do inline safepoints for watchos_arm64
Merge-request: KT-MR-6993 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
@@ -6212,11 +6212,11 @@ if (HostManager.@Companion.hostIsMac) {
|
||||
phaseToCheck = "BitcodeOptimization"
|
||||
}
|
||||
|
||||
fileCheckTest("filecheck_redundant_safepoints_removal_arm") {
|
||||
fileCheckTest("filecheck_redundant_safepoints_removal_smallbinary") {
|
||||
enabled = isExperimentalMM && project.globalTestArgs.contains("-opt")
|
||||
annotatedSource = project.file('filecheck/redundant_safepoints.kt')
|
||||
targetName = "watchos_arm32"
|
||||
checkPrefix = "CHECK-ARM"
|
||||
checkPrefix = "CHECK-SMALLBINARY"
|
||||
extraOpts = ["-Xbinary=memoryModel=experimental", "-opt"]
|
||||
phaseToCheck = "RemoveRedundantSafepoints"
|
||||
}
|
||||
@@ -6226,8 +6226,7 @@ if (HostManager.@Companion.hostIsMac) {
|
||||
fileCheckTest("filecheck_redundant_safepoints_removal") {
|
||||
enabled = isExperimentalMM && isCmsGC &&
|
||||
project.globalTestArgs.contains("-opt") &&
|
||||
project.testTarget != "watchos_arm32" &&
|
||||
project.testTarget != "ios_arm32"
|
||||
!needSmallBinary(project)
|
||||
annotatedSource = project.file('filecheck/redundant_safepoints.kt')
|
||||
phaseToCheck = "RemoveRedundantSafepoints"
|
||||
}
|
||||
|
||||
@@ -16,16 +16,16 @@ fun g() = f()
|
||||
@Retain
|
||||
fun h(cond: Boolean): Any {
|
||||
// CHECK: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||
// CHECK-ARM: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||
// CHECK-SMALLBINARY: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||
// CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||
// CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||
// CHECK: br
|
||||
// CHECK-ARM: br
|
||||
// CHECK-SMALLBINARY: br
|
||||
if (cond) {
|
||||
// CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||
// CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||
// CHECK: br
|
||||
// CHECK-ARM: br
|
||||
// CHECK-SMALLBINARY: br
|
||||
return listOf(C(), C())
|
||||
} else {
|
||||
// CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||
@@ -39,7 +39,7 @@ fun h(cond: Boolean): Any {
|
||||
@Retain
|
||||
fun main() {
|
||||
// CHECK: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||
// CHECK-ARM: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||
// CHECK-SMALLBINARY: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||
// CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||
// CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||
println(g())
|
||||
|
||||
@@ -46,6 +46,11 @@ object PlatformInfo {
|
||||
return getTarget(project).supportsExceptions()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun needSmallBinary(project: Project): Boolean {
|
||||
return getTarget(project).needSmallBinary()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun supportsLibBacktrace(project: Project): Boolean {
|
||||
return getTarget(project).supportsLibBacktrace()
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ fun KonanTarget.supportsUnalignedAccess(): Boolean = when (architecture) {
|
||||
Architecture.X86, Architecture.ARM64, Architecture.X64 -> true
|
||||
} && this != KonanTarget.WATCHOS_ARM64
|
||||
|
||||
fun KonanTarget.needSmallBinary() = (architecture == Architecture.ARM32 && family.isAppleFamily) || this == KonanTarget.WATCHOS_ARM64
|
||||
fun KonanTarget.needSmallBinary() = (architecture == Architecture.ARM32 && family.isAppleFamily)
|
||||
|
||||
fun KonanTarget.supportedSanitizers(): List<SanitizerKind> =
|
||||
when(this) {
|
||||
|
||||
Reference in New Issue
Block a user