ForLoopsLowering: Add PLUSEQ origin to increment to use IINC

instructions if possible.
This commit is contained in:
Mark Punzalan
2020-10-09 07:11:29 +00:00
committed by Alexander Udalov
parent 14137cb013
commit 8bc7370b92
8 changed files with 62 additions and 24 deletions

View File

@@ -17,13 +17,5 @@ fun foo() {
// 3 LLOAD
// 1 MAXLOCALS = 10
// 0 InlineMarker
// JVM_TEMPLATES
// fake inline variables occupy 7 ISTOREs.
// 16 ISTORE
// 11 ILOAD
// JVM_IR_TEMPLATES
// JVM_IR generates an extra induction variable in 'for (i in 1..2)' (see KT-36837)
// 19 ISTORE
// 14 ILOAD

View File

@@ -18,13 +18,5 @@ fun test() {
// 1 MAXLOCALS = 3
// 1 MAXLOCALS = 4
// 0 InlineMarker
// JVM_TEMPLATES
// fake inline variables occupy 7 ISTOREs.
// 14 ISTORE
// 7 ILOAD
// JVM_IR_TEMPLATES
// JVM_IR generates an extra induction variable in 'for (i in 1..2)' (see KT-36837)
// 17 ISTORE
// 10 ILOAD