summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-04-30 10:46:38 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-04-30 10:46:38 +0000
commitddadbf8d3328f810c0b59ab1f8b2685108ad048c (patch)
tree53333d5ae48f555ef25d1ab9406279d44b11e994 /compiler/optimizing/builder.cc
parentaf6535b39fb8630e02cd38ca594dec1d65be90cd (diff)
parent4ffbc975a8614ed314114895df93c345e14c8163 (diff)
am 4ffbc975: am 56784f88: Merge "GVN final fields even with side effects."
* commit '4ffbc975a8614ed314114895df93c345e14c8163': GVN final fields even with side effects.
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 0f44af07b8..c04fe4ec76 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -816,6 +816,7 @@ bool HGraphBuilder::BuildInstanceFieldAccess(const Instruction& instruction,
current_block_->GetLastInstruction(),
field_type,
resolved_field->GetOffset(),
+ resolved_field->IsFinal(),
resolved_field->IsVolatile()));
UpdateLocal(source_or_dest_reg, current_block_->GetLastInstruction());
@@ -917,13 +918,19 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction,
temps.Add(cls);
HInstruction* value = LoadLocal(source_or_dest_reg, field_type);
DCHECK_EQ(value->GetType(), field_type);
- current_block_->AddInstruction(
- new (arena_) HStaticFieldSet(cls, value, field_type, resolved_field->GetOffset(),
- resolved_field->IsVolatile()));
+ current_block_->AddInstruction(new (arena_) HStaticFieldSet(
+ cls,
+ value,
+ field_type,
+ resolved_field->GetOffset(),
+ resolved_field->IsVolatile()));
} else {
- current_block_->AddInstruction(
- new (arena_) HStaticFieldGet(cls, field_type, resolved_field->GetOffset(),
- resolved_field->IsVolatile()));
+ current_block_->AddInstruction(new (arena_) HStaticFieldGet(
+ cls,
+ field_type,
+ resolved_field->GetOffset(),
+ resolved_field->IsFinal(),
+ resolved_field->IsVolatile()));
UpdateLocal(source_or_dest_reg, current_block_->GetLastInstruction());
}
return true;