Status Update
Comments
ze...@google.com <ze...@google.com> #2
ms...@gmail.com <ms...@gmail.com> #3
Branch: 8.2
commit ea625d87f24c2ae20f8705d04180cce9d98e448f
Author: Søren Gjesse <sgjesse@google.com>
Date: Wed Nov 22 14:14:53 2023
Desugar records again for Android U (API level 34)
Art had a bug in native record support in the initial release of
Android U.
This will be fixed with Art mainline updates, but turning record
desugaring on again for API level 34 to avoid hitting issues on
Android U where mainline updates are not been applied.
Also removed the predicate canUseNativeRecords and replaced with
isRecordsDesugaredForD8 and isRecordsDesugaredForR8. These two
together with runtimeWithRecordsSupport are now used in all record
tests.
Bug:
Change-Id: I111e9779b657492583cd7b9eb60788d8ec6d198e
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/test/java/com/android/tools/r8/TestBase.java
M src/test/java/com/android/tools/r8/ToolHelper.java
M src/test/java/com/android/tools/r8/desugar/records/EmptyRecordAnnotationTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordBlogTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordComponentAnnotationsTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordComponentSignatureTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordInterfaceTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordInvokeCustomSplitDesugaringTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordMergeTest.java
M src/test/java/com/android/tools/r8/desugar/records/SimpleRecordTest.java
M src/test/java/com/android/tools/r8/profile/art/completeness/RecordProfileRewritingTest.java
ap...@google.com <ap...@google.com> #4
Branch: 8.2
commit 136c261588ac8f3ac0212a78c4523d28e9e51b15
Author: Søren Gjesse <sgjesse@google.com>
Date: Wed Nov 22 14:16:25 2023
Version 8.2.38
Bug:
Change-Id: I7997e9387b94f42d7a3dd73ceccd055999d54941
M src/main/java/com/android/tools/r8/Version.java
ze...@google.com <ze...@google.com> #5
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Hedgehog | 2023.1.1 Patch 1
- Android Gradle Plugin 8.2.1
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
ze...@google.com <ze...@google.com> #6
ms...@gmail.com <ms...@gmail.com> #7
Thank you!
ms...@gmail.com <ms...@gmail.com> #8
I am curious, is this issue unlikely to be solved in the near future? If so, we will just code up a workaround for now in WALA, so we can continue with updating our r8 dependence. Thanks again!
sg...@google.com <sg...@google.com> #9
It might take a bit of time to look into the concerns from
ap...@google.com <ap...@google.com> #10
Branch: main
commit 6f3ea6138d0dbef4eb3b2b501b53ed48ea86c2d4
Author: Ian Zerny <zerny@google.com>
Date: Tue Dec 19 08:48:47 2023
Disable redundant load elimination in debug mode
Bug:
Bug:
Change-Id: I2df1712dfb920c68feeba2dcdcfc1c735e615993
M src/main/java/com/android/tools/r8/ir/conversion/passes/CodeRewriterPassCollection.java
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/regress/b316744331/Regress316744331Test.java
ap...@google.com <ap...@google.com> #11
Branch: main
commit 24659d5eae579cd1db20ffe88f6a634a333e9bfe
Author: Christoffer Adamsen <christofferqa@google.com>
Date: Wed Jan 03 16:11:05 2024
Reland "Disable redundant load elimination in debug mode"
Bug:
Bug:
Change-Id: I1c4fba711609183130735f8b93d0dbe627dec1c1
M src/main/java/com/android/tools/r8/ir/conversion/passes/CodeRewriterPassCollection.java
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/regress/b316744331/Regress316744331Test.java
ap...@google.com <ap...@google.com> #12
Branch: main
commit c0b9ea0f3b9dd56f6e301b96d48eb1c583497f24
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Mon Jan 08 10:44:08 2024
Update 911-get-stack-trace after disabling field load elimination
D8 8.4.5-dev disables redundant field load elimination in debug mode.
Bug: 316744331
Change-Id: Iee10c8656266b41ef108d5da1c1716ac27ea8ef9
Test: existing
M test/911-get-stack-trace/expected-stdout.txt
ap...@google.com <ap...@google.com> #13
Branch: 8.0
commit 44de2d3b1a19951abccf33e2412d625b11ca437e
Author: Ian Zerny <zerny@google.com>
Date: Tue Jan 09 09:54:22 2024
Version 8.0.75
Bug:
Change-Id: I7347b09a29ba027dabcb999348422802935d24c7
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #14
Branch: 8.0
commit ab8f6074de78773d0a2796a95ee3285cc6598bcf
Author: Ian Zerny <zerny@google.com>
Date: Tue Jan 09 09:49:33 2024
Reland "Disable redundant load elimination in debug mode"
Notice: this cherry pick is written manually as this branch is from
before the introduction of code rewriter passes.
Bug:
Bug:
Change-Id: I1c4fba711609183130735f8b93d0dbe627dec1c1
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
ap...@google.com <ap...@google.com> #15
Branch: 8.3
commit a7a3e45076d5fa6124376bd48022d4064b148df9
Author: Ian Zerny <zerny@google.com>
Date: Tue Jan 09 14:14:44 2024
Version 8.3.30
Bug:
Change-Id: I7edbb53ca57833a476577c26e766ca7aae001f86
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #16
Branch: 8.3
commit bf16876c41ebee42408696d4be2fb6434f3cf341
Author: Ian Zerny <zerny@google.com>
Date: Tue Jan 09 14:13:53 2024
Reland "Disable redundant load elimination in debug mode"
Notice: this cherry pick is written manually as this branch is from
before the introduction of code rewriter passes.
Bug:
Bug:
Change-Id: I1c4fba711609183130735f8b93d0dbe627dec1c1
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
ap...@google.com <ap...@google.com> #17
Branch: 8.2
commit fe9c21581262cb92258d217c1c4f52a652e64d4d
Author: Ian Zerny <zerny@google.com>
Date: Tue Jan 09 13:48:00 2024
Reland "Disable redundant load elimination in debug mode"
Notice: this cherry pick is written manually as this branch is from
before the introduction of code rewriter passes.
Bug:
Bug:
Change-Id: I1c4fba711609183130735f8b93d0dbe627dec1c1
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
ap...@google.com <ap...@google.com> #18
Branch: 8.2
commit fd4b26bdc8af1f07472da2af2114e027e53a0efc
Author: Ian Zerny <zerny@google.com>
Date: Tue Jan 09 13:50:35 2024
Version 8.2.46
Bug:
Change-Id: I880c56fd07902c4697105778150be4cc16cd27a6
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #19
Branch: 8.1
commit 59a7c1ac06e0fed85dd2f4f2a710f11fe433640b
Author: Ian Zerny <zerny@google.com>
Date: Tue Jan 09 12:13:37 2024
Reland "Disable redundant load elimination in debug mode"
Notice: this cherry pick is written manually as this branch is from
before the introduction of code rewriter passes.
Bug:
Bug:
Change-Id: I1c4fba711609183130735f8b93d0dbe627dec1c1
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
ap...@google.com <ap...@google.com> #20
Branch: 8.1
commit 916a6d04b1c84a95bca923f2ea273fd7d52532fa
Author: Ian Zerny <zerny@google.com>
Date: Tue Jan 09 12:14:41 2024
Version 8.1.78
Bug:
Change-Id: I00bd2fac3a2548883838209d239b7fd200a54da0
M src/main/java/com/android/tools/r8/Version.java
ze...@google.com <ze...@google.com> #21
A fix has been pushed to 8.0, 8.1, 8.2 and 8.3 branches for R8.
To use one of the fixed versions without AGP updates amend your settings.gradle
or settings.gradle.kts
file with:
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:8.2.46") // <-- Use version matching your AGP here
}
}
}
Since AGP 8, the R8 versions follow those of AGP, so if using AGP 8.2 use the latest version on the R8 8.2 branch (for this
ms...@gmail.com <ms...@gmail.com> #22
Thank you for fixing this issue!
an...@google.com <an...@google.com> #23
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Hedgehog | 2023.1.1 Patch 2
- Android Gradle Plugin 8.2.2
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
so...@google.com <so...@google.com> #24
Comment added by automation: A postmortem has been automatically requested for this issue. Please author a postmortem on IRM. See go/android-postmortem-guidance for more context and details, including how to handle the case when this issue does not need a postmortem. If you have any questions not answered by go/android-postmortem-guidance, please email android-hygiene-tpm@, instead of reassigning the fixed bug. Thank you.
an...@google.com <an...@google.com> #25
The fixes for this issue are now also available in:
- Android Studio Iguana | 2023.2.1 RC 1
- Android Gradle Plugin 8.3.0-rc01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Description
I work on the WALA static analysis framework (https://github.com/wala/WALA ), and we use D8 to test WALA's Dalvik frontend. I've been trying to update to the latest D8 version and I ran into an issue with unexpected dead code elimination. Consider the following (weird) Java code from JLex:
With the old D8 version we were using (2.2.42), the
System.out.println
calls would be present in the Dalvik bytecode output of D8, even though they are clearly dead code. But with verson 8.2.39, these calls are eliminated. I wouldn't expect D8 alone to be doing this optimization. Here is how we run D8 on a jar:Is the new output expected? I.e., is this level of dead code elimination now "baked in" to D8? Thanks!