summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.cc
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-05-03 14:13:58 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-05-03 14:13:59 +0000
commit29825550d6bd7f1185e16b3925c7f084078e688e (patch)
treece96bd0b74266b14d47419cd1d4dd969801198eb /compiler/optimizing/graph_checker.cc
parent15cb9753075bcaa5b91a6497a2d35e8bd98af1f0 (diff)
parentd01745ef88bfd25df574a885d90a1a7785db5f5b (diff)
Merge "optimizing: constructor fence redundancy elimination - remove dmb after LSE"
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
-rw-r--r--compiler/optimizing/graph_checker.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc
index 12340b416d..6a140458a6 100644
--- a/compiler/optimizing/graph_checker.cc
+++ b/compiler/optimizing/graph_checker.cc
@@ -341,7 +341,12 @@ void GraphChecker::VisitInstruction(HInstruction* instruction) {
const HInstructionList& list = input->IsPhi()
? input->GetBlock()->GetPhis()
: input->GetBlock()->GetInstructions();
- if (!list.Contains(input)) {
+ if (input->GetBlock() == nullptr) {
+ AddError(StringPrintf("Input %d of instruction %d is not in any "
+ "basic block of the control-flow graph.",
+ input->GetId(),
+ instruction->GetId()));
+ } else if (!list.Contains(input)) {
AddError(StringPrintf("Input %d of instruction %d is not defined "
"in a basic block of the control-flow graph.",
input->GetId(),