Inlining moved in the beginning of lowering passes

This commit is contained in:
Konstantin Anisimov
2017-01-31 16:03:30 +07:00
parent e10d9b62e2
commit 8d943bc5ab
@@ -17,6 +17,9 @@ internal class KonanLower(val context: Context) {
fun lower(irFile: IrFile) {
val phaser = PhaseManager(context)
phaser.phase(KonanPhase.LOWER_INLINE) {
FunctionInlining(context).inline(irFile)
}
phaser.phase(KonanPhase.LOWER_DEFAULT_PARAMETER_EXTENT) {
DefaultParameterStubGenerator(context).runOnFilePostfix(irFile)
DefaultParameterInjector(context).runOnFilePostfix(irFile)
@@ -39,8 +42,5 @@ internal class KonanLower(val context: Context) {
phaser.phase(KonanPhase.AUTOBOX) {
Autoboxing(context).lower(irFile)
}
phaser.phase(KonanPhase.LOWER_INLINE) {
FunctionInlining(context).inline(irFile)
}
}
}