summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Mingyao Yang <mingyao@google.com> 2015-10-22 15:40:58 -0700
committer Mingyao Yang <mingyao@google.com> 2015-10-22 16:37:46 -0700
commit8df69d42a9e3ccd9456ff72fac8dbd1999f98755 (patch)
treeb2d7617d4d2e1ae80ab7024b47802dafbaee3b3a /compiler/optimizing/builder.cc
parent823e693aa946ba75cd047429e1290011a2ed8729 (diff)
Revert "Revert "load store elimination.""
This reverts commit 8030c4100d2586fac39ed4007c61ee91d4ea4f25. Change-Id: I79558d85484be5f5d04e4a44bea7201fece440f0
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 5dd5be3259..8ca352f573 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -1241,12 +1241,14 @@ bool HGraphBuilder::BuildInstanceFieldAccess(const Instruction& instruction,
field_index,
dex_pc);
} else {
+ uint16_t class_def_index = resolved_field->GetDeclaringClass()->GetDexClassDefIndex();
field_set = new (arena_) HInstanceFieldSet(null_check,
value,
field_type,
resolved_field->GetOffset(),
resolved_field->IsVolatile(),
field_index,
+ class_def_index,
*dex_file_,
dex_compilation_unit_->GetDexCache(),
dex_pc);
@@ -1261,11 +1263,13 @@ bool HGraphBuilder::BuildInstanceFieldAccess(const Instruction& instruction,
field_index,
dex_pc);
} else {
+ uint16_t class_def_index = resolved_field->GetDeclaringClass()->GetDexClassDefIndex();
field_get = new (arena_) HInstanceFieldGet(null_check,
field_type,
resolved_field->GetOffset(),
resolved_field->IsVolatile(),
field_index,
+ class_def_index,
*dex_file_,
dex_compilation_unit_->GetDexCache(),
dex_pc);
@@ -1407,6 +1411,8 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction,
cls = new (arena_) HClinitCheck(constant, dex_pc);
current_block_->AddInstruction(cls);
}
+
+ uint16_t class_def_index = resolved_field->GetDeclaringClass()->GetDexClassDefIndex();
if (is_put) {
// We need to keep the class alive before loading the value.
Temporaries temps(graph_);
@@ -1419,6 +1425,7 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction,
resolved_field->GetOffset(),
resolved_field->IsVolatile(),
field_index,
+ class_def_index,
*dex_file_,
dex_cache_,
dex_pc));
@@ -1428,6 +1435,7 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction,
resolved_field->GetOffset(),
resolved_field->IsVolatile(),
field_index,
+ class_def_index,
*dex_file_,
dex_cache_,
dex_pc));