summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-10-08 16:48:31 +0100
committer Calin Juravle <calin@google.com> 2015-10-09 14:34:08 +0100
commita9a306d4c1abd43efe75987f174f64fe9e385874 (patch)
tree465805f9233dc49b244d1a03cbb4e720e51e020f /compiler/optimizing/nodes.h
parentcff8cc7818dd901d3667025ad0ff654100bbb629 (diff)
Add a clarifying comment on HLoadClass::InstructionDataEquals.
Change-Id: I4c298a453f03cde9d32fe43aff86886835af16fe
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 615012eb3a..c126b59bcc 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -4510,6 +4510,9 @@ class HLoadClass : public HExpression<1> {
bool CanBeMoved() const OVERRIDE { return true; }
bool InstructionDataEquals(HInstruction* other) const OVERRIDE {
+ // Note that we don't need to test for generate_clinit_check_.
+ // Whether or not we need to generate the clinit check is processed in
+ // prepare_for_register_allocator based on existing HInvokes and HClinitChecks.
return other->AsLoadClass()->type_index_ == type_index_ &&
other->AsLoadClass()->needs_access_check_ == needs_access_check_;
}