FIR: report lowering time from JvmIrCodegenFactory
This commit is contained in:
@@ -49,6 +49,7 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory
|
||||
val irProviders: List<IrProvider>,
|
||||
val extensions: JvmGeneratorExtensions,
|
||||
val backendExtension: JvmBackendExtension,
|
||||
val notifyCodegenStart: () -> Unit,
|
||||
)
|
||||
|
||||
override fun generateModule(state: GenerationState, files: Collection<KtFile>) {
|
||||
@@ -158,6 +159,7 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory
|
||||
irProviders,
|
||||
extensions,
|
||||
JvmBackendExtension.Default,
|
||||
{},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -173,7 +175,7 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory
|
||||
}
|
||||
|
||||
fun doGenerateFilesInternal(input: JvmIrBackendInput) {
|
||||
val (state, irModuleFragment, symbolTable, sourceManager, phaseConfig, irProviders, extensions, backendExtension) = input
|
||||
val (state, irModuleFragment, symbolTable, sourceManager, phaseConfig, irProviders, extensions, backendExtension, notifyCodegenStart) = input
|
||||
val context = JvmBackendContext(
|
||||
state, sourceManager, irModuleFragment.irBuiltins, irModuleFragment,
|
||||
symbolTable, phaseConfig, extensions, backendExtension
|
||||
@@ -189,6 +191,8 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory
|
||||
|
||||
JvmLower(context).lower(irModuleFragment)
|
||||
|
||||
notifyCodegenStart()
|
||||
|
||||
for (generateMultifileFacade in listOf(true, false)) {
|
||||
for (irFile in irModuleFragment.files) {
|
||||
// Generate multifile facades first, to compute and store JVM signatures of const properties which are later used
|
||||
@@ -221,10 +225,11 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory
|
||||
sourceManager: PsiSourceManager,
|
||||
extensions: JvmGeneratorExtensions,
|
||||
backendExtension: JvmBackendExtension,
|
||||
notifyCodegenStart: () -> Unit
|
||||
) {
|
||||
val irProviders = configureBuiltInsAndgenerateIrProvidersInFrontendIRMode(irModuleFragment, symbolTable, extensions)
|
||||
doGenerateFilesInternal(
|
||||
JvmIrBackendInput(state, irModuleFragment, symbolTable, sourceManager, phaseConfig, irProviders, extensions, backendExtension)
|
||||
JvmIrBackendInput(state, irModuleFragment, symbolTable, sourceManager, phaseConfig, irProviders, extensions, backendExtension, notifyCodegenStart)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user