Fix inlining and lse bugs with unresolved access.
bug:25414532
Change-Id: I48b6660754774ea3e8a62a74175b1aa3728e0151
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 0aaa6b3..353881e 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -494,6 +494,26 @@
<< " it is in a different dex file and requires access to the dex cache";
return false;
}
+
+ if (current->IsNewInstance() &&
+ (current->AsNewInstance()->GetEntrypoint() == kQuickAllocObjectWithAccessCheck)) {
+ // Allocation entrypoint does not handle inlined frames.
+ return false;
+ }
+
+ if (current->IsNewArray() &&
+ (current->AsNewArray()->GetEntrypoint() == kQuickAllocArrayWithAccessCheck)) {
+ // Allocation entrypoint does not handle inlined frames.
+ return false;
+ }
+
+ if (current->IsUnresolvedStaticFieldGet() ||
+ current->IsUnresolvedInstanceFieldGet() ||
+ current->IsUnresolvedStaticFieldSet() ||
+ current->IsUnresolvedInstanceFieldSet()) {
+ // Entrypoint for unresolved fields does not handle inlined frames.
+ return false;
+ }
}
}
number_of_inlined_instructions_ += number_of_instructions;