DONT_MERGE: Turn on double inlining for Native
diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/NativeLoweringPhases.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/NativeLoweringPhases.kt
index 96025ed..fc0ff1f 100644
--- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/NativeLoweringPhases.kt
+++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/NativeLoweringPhases.kt
@@ -605,7 +605,7 @@
inlineCallableReferenceToLambdaPhase,
arrayConstructorPhase,
wrapInlineDeclarationsWithReifiedTypeParametersLowering,
- inlineOnlyPrivateFunctionsPhase.takeIf { context.config.configuration.getBoolean(KlibConfigurationKeys.EXPERIMENTAL_DOUBLE_INLINING) },
+ inlineOnlyPrivateFunctionsPhase,
// TODO KT-69174: the placeholder for synthetic accessors lowering
)
diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/TopLevelPhases.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/TopLevelPhases.kt
index 800cadb..4304f9d 100644
--- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/TopLevelPhases.kt
+++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/driver/phases/TopLevelPhases.kt
@@ -352,9 +352,7 @@
// To avoid overcomplicating things and to keep running the preceding lowerings with "modify-only-lowered-file"
// invariant, we would like to put a synchronization point immediately before "InlineAllFunctions".
runLowerings(getLoweringsUpToAndIncludingSyntheticAccessors(), allModulesToLower)
- if (context.config.configuration.getBoolean(KlibConfigurationKeys.EXPERIMENTAL_DOUBLE_INLINING)) {
- runIrValidationPhase(validateIrAfterInliningOnlyPrivateFunctions, allModulesToLower)
- }
+ runIrValidationPhase(validateIrAfterInliningOnlyPrivateFunctions, allModulesToLower)
runLowerings(listOf(inlineAllFunctionsPhase), allModulesToLower)
}
runIrValidationPhase(validateIrAfterInliningAllFunctions, allModulesToLower)
diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/NativeInlineFunctionResolver.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/NativeInlineFunctionResolver.kt
index 49c756c..36b6190 100644
--- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/NativeInlineFunctionResolver.kt
+++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/NativeInlineFunctionResolver.kt
@@ -97,9 +97,7 @@
ArrayConstructorLowering(context).lower(body, function)
WrapInlineDeclarationsWithReifiedTypeParametersLowering(context).lower(body, function)
- if (context.config.configuration.getBoolean(KlibConfigurationKeys.EXPERIMENTAL_DOUBLE_INLINING)) {
- NativeIrInliner(generationState, inlineOnlyPrivateFunctions = true).lower(body, function)
- }
+ NativeIrInliner(generationState, inlineOnlyPrivateFunctions = true).lower(body, function)
// TODO KT-69174: the placeholder for synthetic accessors lowering - it should generate accessors only for
// private declarations references from the lowered non-private inline function; the rest of IR file