summaryrefslogtreecommitdiff
path: root/test/569-checker-pattern-replacement/src-multidex/Second.java
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-02-21 12:13:01 +0100
committer VladimĂ­r Marko <vmarko@google.com> 2024-02-29 12:44:34 +0000
commitaa02410a2de17b638a1eb5c664b390c4b1c36aed (patch)
tree9eb6c1da551ba729c413a49482acdea22e814439 /test/569-checker-pattern-replacement/src-multidex/Second.java
parenta24ffcd41360ed6f6d2fb984041237495e39f7f2 (diff)
Inliner: Always try code pattern recognition.
Try code pattern recognition whenever we're allowed to inline. The pattern recognition is fast and when we find a match, we avoid costly processing, such as building the callee graph. The pattern replacement is always better than the invoke, so do it even when inlining is not "encouraged", for example in blocks that end with a `throw`. Reorder the code so that the pattern recognition respects the @NeverInline annotation. Enable run-test 569 for target and add a test for the @NeverInline annotation. Also remove some duplicated helper functions and reduce the number of arguments we pass around. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: testrunner.py --jvm Test: run-gtests.sh Test: testrunner.py --target --optimizing Bug: 181943478 Change-Id: I863fe1190eb38c7decf0c5e34a00c103e8e559f1
Diffstat (limited to 'test/569-checker-pattern-replacement/src-multidex/Second.java')
-rw-r--r--test/569-checker-pattern-replacement/src-multidex/Second.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/569-checker-pattern-replacement/src-multidex/Second.java b/test/569-checker-pattern-replacement/src-multidex/Second.java
index 89835c6f22..6528806a0c 100644
--- a/test/569-checker-pattern-replacement/src-multidex/Second.java
+++ b/test/569-checker-pattern-replacement/src-multidex/Second.java
@@ -14,9 +14,14 @@
* limitations under the License.
*/
+import dalvik.annotation.optimization.NeverInline;
+
public final class Second {
public static void staticNop(int unused) { }
+ @NeverInline
+ public static void staticNopNeverInline(int unused) { }
+
public void nop() { }
public static Object staticReturnArg2(int unused1, String arg2) {