summaryrefslogtreecommitdiff
path: root/compiler/optimizing/intrinsics.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-02-04 19:46:56 +0000
committer Vladimir Marko <vmarko@google.com> 2016-02-10 10:12:22 +0000
commitf8b3b8bc37fb04d8ae113ae6bfcf4de2f5a700d4 (patch)
treecee02ae8f42e413e2d6af2140cd2f08e6ea34e6d /compiler/optimizing/intrinsics.cc
parent8b0e9b87ab6e54237b2d1e101b8cce7ea6443238 (diff)
Try to substitute constructor chains for IPUTs.
Match a constructor chain where each constructor either forwards some or all of its arguments to the next (i.e. superclass constructor or a constructor in the same class) and may pass extra zeros (of any type, including null), followed by any number of IPUTs on "this", storing either arguments or zeros, until we reach the contructor of java.lang.Object. When collecting IPUTs from the constructor chain, remove any IPUTs that store the same field as an IPUT that comes later. This is safe in this case even if those IPUTs store volatile fields because the uninitialized object reference wasn't allowed to escape yet. Also remove any IPUTs that store zero values as the allocated object is already zero initialized. (cherry picked from commit 354efa6cdf558b2331e8fec539893fa51763806e) Change-Id: I691e3b82e550e7a3272ce6a81647c7fcd02c01b1
Diffstat (limited to 'compiler/optimizing/intrinsics.cc')
-rw-r--r--compiler/optimizing/intrinsics.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/optimizing/intrinsics.cc b/compiler/optimizing/intrinsics.cc
index a6be324730..db39bc8eec 100644
--- a/compiler/optimizing/intrinsics.cc
+++ b/compiler/optimizing/intrinsics.cc
@@ -481,6 +481,7 @@ static Intrinsics GetIntrinsic(InlineMethod method) {
case kInlineOpNonWideConst:
case kInlineOpIGet:
case kInlineOpIPut:
+ case kInlineOpConstructor:
return Intrinsics::kNone;
// String init cases, not intrinsics.