summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-04-29 16:46:27 +0100
committerNicolas Geoffray <ngeoffray@google.com>2015-04-30 11:20:21 +0100
commit781733632637db98d79dfffad72bf063be3259be (patch)
treea4ea455e89adb9db77e25525a81737f3b0ab0c58 /compiler/optimizing/nodes.h
parent36ad3f1c3c08a49680a8f5d34bba43199ab9dd5b (diff)
downloadart-781733632637db98d79dfffad72bf063be3259be.zip
art-781733632637db98d79dfffad72bf063be3259be.tar.gz
art-781733632637db98d79dfffad72bf063be3259be.tar.bz2
GVN final fields even with side effects.
Two accesses of a final field can be GVN'ed even if there are side effects between them. Change-Id: I04495ae83c7858f4216b083ad1c29851954320ad
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 3fe23e1..51c68e9 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -2993,8 +2993,10 @@ class HInstanceFieldGet : public HExpression<1> {
HInstanceFieldGet(HInstruction* value,
Primitive::Type field_type,
MemberOffset field_offset,
+ bool is_final,
bool is_volatile)
- : HExpression(field_type, SideEffects::DependsOnSomething()),
+ : HExpression(field_type,
+ is_final ? SideEffects::None() : SideEffects::DependsOnSomething()),
field_info_(field_offset, field_type, is_volatile) {
SetRawInputAt(0, value);
}
@@ -3404,8 +3406,10 @@ class HStaticFieldGet : public HExpression<1> {
HStaticFieldGet(HInstruction* cls,
Primitive::Type field_type,
MemberOffset field_offset,
+ bool is_final,
bool is_volatile)
- : HExpression(field_type, SideEffects::DependsOnSomething()),
+ : HExpression(field_type,
+ is_final ? SideEffects::None() : SideEffects::DependsOnSomething()),
field_info_(field_offset, field_type, is_volatile) {
SetRawInputAt(0, cls);
}