Status Update
Comments
sg...@google.com <sg...@google.com>
cl...@google.com <cl...@google.com> #2
We changed the place of "isConsistentSSA" recently. The reason was that the IR is not necessarily in consistent SSA at the beginning of IR processing, until the lensCodeRewriter, enum unboxer rewriter and lambda merger have been fully run. We moved the check down so that the IR is necessarily in consistent SSA when the check is performed. It may have been moved twice (once to make enum unboxing work, a second time as a refactoring to make the code nice and clean).
We still need to investigate why the def-use chain is broken though.
cl...@google.com <cl...@google.com> #3
We cannot backport anymore to 4.0.
I will try to bisect to figure out where does this come from.
cl...@google.com <cl...@google.com> #4
The commit below is responsible for the fix. I don't think we can backport to 4.0 at this point however.
Author: Ian Zerny <zerny@google.com>
Date: Mon Feb 3 12:50:59 2020 +0100
Don't replace local writes by phi introduced locals.
Bug: 148661132
Change-Id: Iab815abe01e6db2c7b9bdf86b2e0715d7a5a2a4f
.../android/tools/r8/ir/optimize/CodeRewriter.java | 32 -------
.../tools/r8/debug/Regress148661132Test.java | 100 +++++++++++++++++++++
2 files changed, 100 insertions(+), 32 deletions(-)
create mode 100644 src/test/java/com/android/tools/r8/debug/Regress148661132Test.java
cl...@google.com <cl...@google.com> #5
OK I'm making 2.0.74 and backporting this fix.
ap...@google.com <ap...@google.com> #6
Branch: 2.0
commit 685ad9374465eb129da58ec98866fb293828285e
Author: Clément Béra <clementbera@google.com>
Date: Fri May 15 07:09:38 2020
Version 2.0.74
Cherry-pick: Don't replace local writes by phi introduced locals.
CL:
Bug: 148661132
Bug: 156142802
Change-Id: Iab815abe01e6db2c7b9bdf86b2e0715d7a5a2a4f
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/ir/optimize/CodeRewriter.java
A src/test/java/com/android/tools/r8/debug/Regress148661132Test.java
an...@google.com <an...@google.com> #8
to...@gmail.com <to...@gmail.com> #9
Just in case posting here too as 2.0.X is RC:
This have cause a regression and important bug with coroutines.
sg...@google.com <sg...@google.com> #10
Just for the record. The issue
Description
Note that this issue is not reproduced on master, but still present up to the latest stable version, 2.0.73. That's why this issue is about figuring out when and how things are fixed, and if possible, backporting them to necessary stable branches, e.g., 2.0 (for AS 4.0).
The issue is found while working on a new front-end (a.k.a.
fir
) ofkotlinc
. Please find attached class file generated by (still work-in-progress)fir
. Please note that the class file has a resolution error, so the expected behavior is:if the
main
is simply callingInRangeWithNonmatchingArgumentsKt#box
.Interestingly, depending on versions, errors are different, but I guess it's just due to the different place of "first"
isConsistentSSA
check.And, this is the version used by
kotlin
project (I'll update that once the original issue is fixed; I don't want to update D8/R8 to hide the other issue):