Skip to content

Commit

Permalink
Reenable inlining of invokes with nullable receivers
Browse files Browse the repository at this point in the history
Bug: 137174854
Change-Id: Ie5a5dc23dece5700eef4e75b7b241532422dad2a
  • Loading branch information
christofferqa committed Aug 3, 2019
1 parent c844e5e commit 3592a44
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,7 @@ public void disableGlobalOptimizations() {
public boolean enableInliningOfInvokesWithDefinitelyNullReceivers =
System.getProperty("com.android.tools.r8.disableInliningOfInvokesWithDefinitelyNullReceivers")
== null;
// TODO(137174854) Disable until performance regression is investigated.
public boolean enableInliningOfInvokesWithNullableReceivers =
System.getProperty("com.android.tools.r8.enableInliningOfInvokesWithNullableReceivers")
!= null;
public boolean enableInliningOfInvokesWithNullableReceivers = true;
public boolean enableClassInlining = true;
public boolean enableClassStaticizer = true;
public boolean enableInitializedClassesAnalysis = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public void testPvtMethodCallInlined() throws Exception {
options.enableValuePropagation = false;
options.enableClassInlining = false;
options.enableVerticalClassMerging = false;
options.enableInliningOfInvokesWithNullableReceivers = true;
})
.enableInliningAnnotations("nesthostexample")
.setMinApi(parameters.getApiLevel())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ public void test() throws Exception {
options -> {
options.enableInitializedClassesInInstanceMethodsAnalysis =
enableInitializedClassesInInstanceMethodsAnalysis;

// TODO(b/137174854): No need to explicitly turn this on when it gets enabled by
// default.
assert !options.enableInliningOfInvokesWithNullableReceivers;
options.enableInliningOfInvokesWithNullableReceivers = true;
})
.enableClassInliningAnnotations()
.enableInliningAnnotations()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public void test() throws Exception {
.addInnerClasses(InlineInvokeWithNullableReceiverTest.class)
.addKeepMainRule(TestClass.class)
.setMinApi(parameters.getRuntime())
.addOptionsModification(o -> o.enableInliningOfInvokesWithNullableReceivers = true)
.compile()
.inspect(this::verifyMethodHasBeenInlined);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ public void testR8() throws Exception {
.addProgramClasses(CLASSES)
.addLibraryFiles(ToolHelper.getDefaultAndroidJar())
.addKeepClassAndMembersRules(MAIN)
.addOptionsModification(o -> o.enableInliningOfInvokesWithNullableReceivers = true)
.addKeepRules(RULES);
if (!enableClassMerging) {
builder.addOptionsModification(o -> o.enableVerticalClassMerging = false);
Expand Down

0 comments on commit 3592a44

Please sign in to comment.