diff options
| author | 2016-08-08 10:16:43 +0000 | |
|---|---|---|
| committer | 2016-08-08 10:16:43 +0000 | |
| commit | 51616fb233df2760fd6002a02dce692f24b93fb6 (patch) | |
| tree | 61766bfa4bb53bf8f57a6c2645e81d375aa902bf /compiler/optimizing/instruction_simplifier_shared.cc | |
| parent | c10ad423024432df36f6360eafca8332d07b946a (diff) | |
| parent | 12ecf0800d465acdaa3deccd383ff8ed3428a183 (diff) | |
Merge "Enable IntermediateAddress for primitive arrays with read barriers."
Diffstat (limited to 'compiler/optimizing/instruction_simplifier_shared.cc')
| -rw-r--r-- | compiler/optimizing/instruction_simplifier_shared.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/compiler/optimizing/instruction_simplifier_shared.cc b/compiler/optimizing/instruction_simplifier_shared.cc index 8f7778fe68..6632cd9969 100644 --- a/compiler/optimizing/instruction_simplifier_shared.cc +++ b/compiler/optimizing/instruction_simplifier_shared.cc @@ -231,15 +231,6 @@ bool TryExtractArrayAccessAddress(HInstruction* access, HInstruction* array, HInstruction* index, size_t data_offset) { - if (kEmitCompilerReadBarrier) { - // The read barrier instrumentation does not support the - // HIntermediateAddress instruction yet. - // - // TODO: Handle this case properly in the ARM64 and ARM code generator and - // re-enable this optimization; otherwise, remove this TODO. - // b/26601270 - return false; - } if (index->IsConstant() || (index->IsBoundsCheck() && index->AsBoundsCheck()->GetIndex()->IsConstant())) { // When the index is a constant all the addressing can be fitted in the @@ -251,6 +242,13 @@ bool TryExtractArrayAccessAddress(HInstruction* access, // The access may require a runtime call or the original array pointer. return false; } + if (kEmitCompilerReadBarrier && + access->IsArrayGet() && + access->AsArrayGet()->GetType() == Primitive::kPrimNot) { + // For object arrays, the read barrier instrumentation requires + // the original array pointer. + return false; + } // Proceed to extract the base address computation. HGraph* graph = access->GetBlock()->GetGraph(); |