summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-01-29 10:24:41 +0000
committer Vladimir Marko <vmarko@google.com> 2016-01-29 10:55:13 +0000
commitadda435ebb3b678b1920a99d18d63c78031bee83 (patch)
tree1d9ea376c8f8ca72adc92927f5bdaa47e54a132d
parent10cd5eec804167dd67b4fd1096108f0837e151c6 (diff)
Optimizing: Use dex pc 0 for pattern substitution-generated IGET.
In the read barrier configuration, HInstanceFieldGet needs a slow-path with a runtime call with an associated stack map and we assert that we have a valid dex pc for stack maps. Fix the pattern substitution-generated HInstanceFieldGet to use the valid, if bogus, dex pc 0. Bug: 26854537 Bug: 12687968 Change-Id: I9f379ea530ce3f89af8db40169a6c41b525abbd7
-rw-r--r--compiler/optimizing/inliner.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 51fef7c9cb..a839d2dee8 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -669,7 +669,9 @@ HInstanceFieldGet* HInliner::CreateInstanceFieldGet(ArtMethod* resolved_method,
resolved_field->GetDeclaringClass()->GetDexClassDefIndex(),
*resolved_method->GetDexFile(),
dex_cache,
- kNoDexPc);
+ // Read barrier generates a runtime call in slow path and we need a valid
+ // dex pc for the associated stack map. 0 is bogus but valid. Bug: 26854537.
+ /* dex_pc */ 0);
if (iget->GetType() == Primitive::kPrimNot) {
ReferenceTypePropagation rtp(graph_, handles_);
rtp.Visit(iget);
@@ -696,7 +698,9 @@ HInstanceFieldSet* HInliner::CreateInstanceFieldSet(ArtMethod* resolved_method,
resolved_field->GetDeclaringClass()->GetDexClassDefIndex(),
*resolved_method->GetDexFile(),
dex_cache,
- kNoDexPc);
+ // Read barrier generates a runtime call in slow path and we need a valid
+ // dex pc for the associated stack map. 0 is bogus but valid. Bug: 26854537.
+ /* dex_pc */ 0);
return iput;
}
bool HInliner::TryBuildAndInline(ArtMethod* resolved_method,