summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-04-25 03:38:14 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-04-25 03:38:15 +0000
commit940c65d6757130d2e9f864d4c2220838f0312bea (patch)
treec62ba17fb96bdd15dd61b0193c5047c91015e0b6 /compiler/optimizing/graph_checker.cc
parent808db5276827c909818d5595a5600e64b97f66e0 (diff)
parent1152c926076a760490085c4497c3f117fa8da891 (diff)
Merge "[optimizing] Rename HasArrayAccesses and check it"
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
-rw-r--r--compiler/optimizing/graph_checker.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc
index 890676467f..dc3124b35f 100644
--- a/compiler/optimizing/graph_checker.cc
+++ b/compiler/optimizing/graph_checker.cc
@@ -121,6 +121,18 @@ void GraphChecker::VisitBasicBlock(HBasicBlock* block) {
}
}
+void GraphChecker::VisitBoundsCheck(HBoundsCheck* check) {
+ if (!GetGraph()->HasBoundsChecks()) {
+ AddError(StringPrintf("Instruction %s:%d is a HBoundsCheck, "
+ "but HasBoundsChecks() returns false",
+ check->DebugName(),
+ check->GetId()));
+ }
+
+ // Perform the instruction base checks too.
+ VisitInstruction(check);
+}
+
void GraphChecker::VisitInstruction(HInstruction* instruction) {
if (seen_ids_.IsBitSet(instruction->GetId())) {
AddError(StringPrintf("Instruction id %d is duplicate in graph.",