IR: an option to automatically select the number of lowering threads

This commit is contained in:
Georgy Bronnikov
2020-11-06 13:56:48 +03:00
parent 52b3cb362b
commit 103f82c95c
5 changed files with 13 additions and 9 deletions
@@ -122,7 +122,7 @@ private class PerformByIrFilePhase<Context : CommonBackendContext>(
context: Context,
input: IrModuleFragment
): IrModuleFragment {
val nThreads = context.configuration.get(CommonConfigurationKeys.THREADS_FOR_FILE_LOWERINGS) ?: 1
val nThreads = context.configuration.get(CommonConfigurationKeys.PARALLEL_BACKEND_THREADS) ?: 1
return if (nThreads > 1)
invokeParallel(phaseConfig, phaserState, context, input, nThreads)
else