Status Update
Comments
bi...@google.com <bi...@google.com> #2
Thanks for reporting this and for taking the time to create a reproduction. The given app seems to compile to dex in a few seconds, but compiling to class files takes several minutes due to hitting unintentional quadratic behavior in dead code elimination. I will look into fixing this and report back once you should be able to test a new version.
sg...@google.com <sg...@google.com> #3
Branch: main
commit 85ad0d69f99553ce6dd0b99d383e1c55dc70f3df
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Feb 08 08:26:54 2023
Refactor value-is-dead analysis to separate analysis class
Bug:
Change-Id: I8b881203ebe21395f48c8eeb6434faa03f7f9d46
M src/main/java/com/android/tools/r8/ir/code/BasicBlock.java
M src/main/java/com/android/tools/r8/ir/code/Value.java
A src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
bi...@google.com <bi...@google.com> #4
Branch: main
commit 6edc639a92de908f89ba86445a9d6b21351c58fd
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Feb 08 12:31:15 2023
Rewrite value-is-dead analysis to a worklist algorithm
Bug:
Change-Id: I699f43eba8774083a4b5f2aa2edf7c5d80df4c8e
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
bi...@google.com <bi...@google.com> #5
Branch: main
commit 70bbb88b80b31de9a5ccbe30d27a962b0fb0c45a
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Feb 08 16:13:24 2023
Fix repeated analysis of values in dead code removal
Bug:
Change-Id: I9deebf700e936ad81a8fb25d067acc04637d980d
M src/main/java/com/android/tools/r8/ir/code/ArrayPut.java
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
M src/main/java/com/android/tools/r8/utils/MapUtils.java
ga...@google.com <ga...@google.com> #6
Branch: main
commit 54ed0312d2e5ade4b8092a86989d0e6827e646dd
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 08:49:58 2023
Refinements to value-is-dead analysis
Bug:
Fixes:
Change-Id: I8007b13e2a4e0c32dffc181a827867ff4ab0373e
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
ch...@google.com <ch...@google.com> #7
Branch: 4.0
commit 2fc27f8cef33c22525c585e5c65bf3d67a18755a
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:19:09 2023
Version 4.0.53
Bug:
Bug:
Change-Id: I62f98b9723358310ade7f2bd5f8e589fa91c8ab6
M src/main/java/com/android/tools/r8/Version.java
bi...@google.com <bi...@google.com>
bi...@google.com <bi...@google.com> #8
Branch: 4.0
commit b86fdf2b2427605e6a238a0232932fa1268245f8
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:16:04 2023
Refinements to value-is-dead analysis
Bug:
Fixes:
Change-Id: I8007b13e2a4e0c32dffc181a827867ff4ab0373e
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
bi...@google.com <bi...@google.com> #9
Branch: 4.0
commit 472c7fab11e7da906d07eb04d8600f6aea8d3c1e
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:15:38 2023
Fix repeated analysis of values in dead code removal
Bug:
Change-Id: I9deebf700e936ad81a8fb25d067acc04637d980d
M src/main/java/com/android/tools/r8/ir/code/ArrayPut.java
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
M src/main/java/com/android/tools/r8/utils/MapUtils.java
bi...@google.com <bi...@google.com> #10
Branch: 4.0
commit b14e5bc4c5f41fc593cc6176de220ce43d9c899f
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:15:14 2023
Rewrite value-is-dead analysis to a worklist algorithm
Bug:
Change-Id: I699f43eba8774083a4b5f2aa2edf7c5d80df4c8e
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
sg...@google.com <sg...@google.com> #11
Branch: 4.0
commit 4621177fe24819fe5459b065a9d6d138cb79b5b2
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:14:33 2023
Refactor value-is-dead analysis to separate analysis class
Bug:
Change-Id: I8b881203ebe21395f48c8eeb6434faa03f7f9d46
M src/main/java/com/android/tools/r8/ir/code/BasicBlock.java
M src/main/java/com/android/tools/r8/ir/code/Value.java
A src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
ga...@google.com <ga...@google.com> #12
Branch: 8.0
commit 376af144cf327f0f2b0a2de0a38939a59216a08d
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:25:18 2023
Version 8.0.29
Bug:
Bug:
Change-Id: I994d406bae7514482ffdf2ef10f092b5a96cc328
M src/main/java/com/android/tools/r8/Version.java
bi...@google.com <bi...@google.com> #13
Branch: 8.0
commit 77704f63db4161833b7072c42cbf9869a2f20e80
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:23:20 2023
Refinements to value-is-dead analysis
Bug:
Fixes:
Change-Id: I8007b13e2a4e0c32dffc181a827867ff4ab0373e
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
bi...@google.com <bi...@google.com> #14
Branch: 8.0
commit 33930d7b7ff37a746a304bb0230b34123b1e0e6f
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:22:50 2023
Fix repeated analysis of values in dead code removal
Bug:
Change-Id: I9deebf700e936ad81a8fb25d067acc04637d980d
M src/main/java/com/android/tools/r8/ir/code/ArrayPut.java
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
M src/main/java/com/android/tools/r8/utils/MapUtils.java
[Deleted User] <[Deleted User]> #15
Branch: 8.0
commit 923cf259db1b2f35578a486960afcd28369c520f
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:22:16 2023
Rewrite value-is-dead analysis to a worklist algorithm
Bug:
Change-Id: I699f43eba8774083a4b5f2aa2edf7c5d80df4c8e
M src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
ey...@gmail.com <ey...@gmail.com> #16
Branch: 8.0
commit 736dd75501862e23764d265887a99ef8d8af0c9d
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Feb 09 11:21:02 2023
Refactor value-is-dead analysis to separate analysis class
Bug:
Change-Id: I8b881203ebe21395f48c8eeb6434faa03f7f9d46
M src/main/java/com/android/tools/r8/ir/code/BasicBlock.java
M src/main/java/com/android/tools/r8/ir/code/Value.java
A src/main/java/com/android/tools/r8/ir/code/ValueIsDeadAnalysis.java
M src/main/java/com/android/tools/r8/ir/optimize/DeadCodeRemover.java
sg...@google.com <sg...@google.com> #17
This should now be fixed in R8 versions 4.0.53 and 8.0.29 - and next week in 8.1.19-dev.
On my machine the build time for compiling the reproduction with R8 is down from ~190s to ~3s.
ga...@google.com <ga...@google.com> #18
I just tested 4.0.53: on the sample project it also runs in ~3s in my machine. The larger project now finishes within a few minutes, and that previously took almost an hour, wow. Thanks!
Any idea when this fix will become available in the AGP? Next release of Android Studio, I assume?
Description
For AGP 8.0 we should remove the injection of -ignorewarnings , and make missing classes an error.