summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_simplifier_shared.cc
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2016-08-15 13:17:06 +0000
committer Roland Levillain <rpl@google.com> 2016-08-15 13:17:06 +0000
commit4a3aa578eff94eb10450fae1772deb7cb8ddc6a6 (patch)
treeabb3aa17279c6a9edc9dd1c0691738a7f7c69a10 /compiler/optimizing/instruction_simplifier_shared.cc
parent12ecf0800d465acdaa3deccd383ff8ed3428a183 (diff)
Revert "Enable IntermediateAddress for primitive arrays with read barriers."
This CL breaks the angler-userdebug build with `ART_USE_READ_BARRIER=true`. Test: Build angler-userdebug with `ART_USE_READ_BARRIER=true`. Bug: 30762467 Bug: 26601270 Bug: 12687968 This reverts commit 12ecf0800d465acdaa3deccd383ff8ed3428a183. Change-Id: Ia2069ac9436d2336311dd8d0f183c02e587586ae
Diffstat (limited to 'compiler/optimizing/instruction_simplifier_shared.cc')
-rw-r--r--compiler/optimizing/instruction_simplifier_shared.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/compiler/optimizing/instruction_simplifier_shared.cc b/compiler/optimizing/instruction_simplifier_shared.cc
index 6632cd9969..8f7778fe68 100644
--- a/compiler/optimizing/instruction_simplifier_shared.cc
+++ b/compiler/optimizing/instruction_simplifier_shared.cc
@@ -231,6 +231,15 @@ 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
@@ -242,13 +251,6 @@ 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();