summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-04-30 10:31:49 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-04-30 10:31:49 +0000
commit4ffbc975a8614ed314114895df93c345e14c8163 (patch)
tree42225647869863b4c79d537639bc1fb4ea5fdf7f /compiler/optimizing/builder.cc
parentf94b250f426c7f43f9ee78e39e07d6ee13842b20 (diff)
parent56784f887bad1219f326e9e6d110f785f31a5968 (diff)
am 56784f88: Merge "GVN final fields even with side effects."
* commit '56784f887bad1219f326e9e6d110f785f31a5968': 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;