blob: 35c52690dec2d90c7c9a04119bf8666abe8cc176 [file] [log] [blame]
Roland Levillainccc07a92014-09-16 14:48:16 +01001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "graph_checker.h"
18
Roland Levillainccc07a92014-09-16 14:48:16 +010019#include <map>
Nicolas Geoffray7c5367b2014-12-17 10:13:46 +000020#include <string>
Roland Levillainccc07a92014-09-16 14:48:16 +010021
Roland Levillain7e53b412014-09-23 10:50:22 +010022#include "base/bit_vector-inl.h"
Roland Levillain5c4405e2015-01-21 11:39:58 +000023#include "base/stringprintf.h"
Roland Levillain7e53b412014-09-23 10:50:22 +010024
Roland Levillainccc07a92014-09-16 14:48:16 +010025namespace art {
26
27void GraphChecker::VisitBasicBlock(HBasicBlock* block) {
28 current_block_ = block;
29
30 // Check consistency with respect to predecessors of `block`.
31 const GrowableArray<HBasicBlock*>& predecessors = block->GetPredecessors();
32 std::map<HBasicBlock*, size_t> predecessors_count;
33 for (size_t i = 0, e = predecessors.Size(); i < e; ++i) {
34 HBasicBlock* p = predecessors.Get(i);
35 ++predecessors_count[p];
36 }
37 for (auto& pc : predecessors_count) {
38 HBasicBlock* p = pc.first;
39 size_t p_count_in_block_predecessors = pc.second;
40 const GrowableArray<HBasicBlock*>& p_successors = p->GetSuccessors();
41 size_t block_count_in_p_successors = 0;
42 for (size_t j = 0, f = p_successors.Size(); j < f; ++j) {
43 if (p_successors.Get(j) == block) {
44 ++block_count_in_p_successors;
45 }
46 }
47 if (p_count_in_block_predecessors != block_count_in_p_successors) {
Roland Levillain5c4405e2015-01-21 11:39:58 +000048 AddError(StringPrintf(
49 "Block %d lists %zu occurrences of block %d in its predecessors, whereas "
50 "block %d lists %zu occurrences of block %d in its successors.",
51 block->GetBlockId(), p_count_in_block_predecessors, p->GetBlockId(),
52 p->GetBlockId(), block_count_in_p_successors, block->GetBlockId()));
Roland Levillainccc07a92014-09-16 14:48:16 +010053 }
54 }
55
56 // Check consistency with respect to successors of `block`.
57 const GrowableArray<HBasicBlock*>& successors = block->GetSuccessors();
58 std::map<HBasicBlock*, size_t> successors_count;
59 for (size_t i = 0, e = successors.Size(); i < e; ++i) {
60 HBasicBlock* s = successors.Get(i);
61 ++successors_count[s];
62 }
63 for (auto& sc : successors_count) {
64 HBasicBlock* s = sc.first;
65 size_t s_count_in_block_successors = sc.second;
66 const GrowableArray<HBasicBlock*>& s_predecessors = s->GetPredecessors();
67 size_t block_count_in_s_predecessors = 0;
68 for (size_t j = 0, f = s_predecessors.Size(); j < f; ++j) {
69 if (s_predecessors.Get(j) == block) {
70 ++block_count_in_s_predecessors;
71 }
72 }
73 if (s_count_in_block_successors != block_count_in_s_predecessors) {
Roland Levillain5c4405e2015-01-21 11:39:58 +000074 AddError(StringPrintf(
75 "Block %d lists %zu occurrences of block %d in its successors, whereas "
76 "block %d lists %zu occurrences of block %d in its predecessors.",
77 block->GetBlockId(), s_count_in_block_successors, s->GetBlockId(),
78 s->GetBlockId(), block_count_in_s_predecessors, block->GetBlockId()));
Roland Levillainccc07a92014-09-16 14:48:16 +010079 }
80 }
81
82 // Ensure `block` ends with a branch instruction.
83 HInstruction* last_inst = block->GetLastInstruction();
84 if (last_inst == nullptr || !last_inst->IsControlFlow()) {
Roland Levillain5c4405e2015-01-21 11:39:58 +000085 AddError(StringPrintf("Block %d does not end with a branch instruction.",
86 block->GetBlockId()));
Roland Levillainccc07a92014-09-16 14:48:16 +010087 }
88
89 // Visit this block's list of phis.
90 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) {
91 // Ensure this block's list of phis contains only phis.
92 if (!it.Current()->IsPhi()) {
Roland Levillain5c4405e2015-01-21 11:39:58 +000093 AddError(StringPrintf("Block %d has a non-phi in its phi list.",
94 current_block_->GetBlockId()));
Roland Levillainccc07a92014-09-16 14:48:16 +010095 }
96 it.Current()->Accept(this);
97 }
98
99 // Visit this block's list of instructions.
100 for (HInstructionIterator it(block->GetInstructions()); !it.Done();
101 it.Advance()) {
102 // Ensure this block's list of instructions does not contains phis.
103 if (it.Current()->IsPhi()) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000104 AddError(StringPrintf("Block %d has a phi in its non-phi list.",
105 current_block_->GetBlockId()));
Roland Levillainccc07a92014-09-16 14:48:16 +0100106 }
107 it.Current()->Accept(this);
108 }
109}
110
111void GraphChecker::VisitInstruction(HInstruction* instruction) {
Nicolas Geoffray7c5367b2014-12-17 10:13:46 +0000112 if (seen_ids_.IsBitSet(instruction->GetId())) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000113 AddError(StringPrintf("Instruction id %d is duplicate in graph.",
114 instruction->GetId()));
Nicolas Geoffray7c5367b2014-12-17 10:13:46 +0000115 } else {
116 seen_ids_.SetBit(instruction->GetId());
117 }
118
Roland Levillainccc07a92014-09-16 14:48:16 +0100119 // Ensure `instruction` is associated with `current_block_`.
Roland Levillain5c4405e2015-01-21 11:39:58 +0000120 if (instruction->GetBlock() == nullptr) {
121 AddError(StringPrintf("%s %d in block %d not associated with any block.",
122 instruction->IsPhi() ? "Phi" : "Instruction",
123 instruction->GetId(),
124 current_block_->GetBlockId()));
125 } else if (instruction->GetBlock() != current_block_) {
126 AddError(StringPrintf("%s %d in block %d associated with block %d.",
127 instruction->IsPhi() ? "Phi" : "Instruction",
128 instruction->GetId(),
129 current_block_->GetBlockId(),
130 instruction->GetBlock()->GetBlockId()));
Roland Levillainccc07a92014-09-16 14:48:16 +0100131 }
Roland Levillain6b469232014-09-25 10:10:38 +0100132
133 // Ensure the inputs of `instruction` are defined in a block of the graph.
134 for (HInputIterator input_it(instruction); !input_it.Done();
135 input_it.Advance()) {
136 HInstruction* input = input_it.Current();
137 const HInstructionList& list = input->IsPhi()
138 ? input->GetBlock()->GetPhis()
139 : input->GetBlock()->GetInstructions();
140 if (!list.Contains(input)) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000141 AddError(StringPrintf("Input %d of instruction %d is not defined "
142 "in a basic block of the control-flow graph.",
143 input->GetId(),
144 instruction->GetId()));
Roland Levillain6b469232014-09-25 10:10:38 +0100145 }
146 }
147
148 // Ensure the uses of `instruction` are defined in a block of the graph.
David Brazdiled596192015-01-23 10:39:45 +0000149 for (HUseIterator<HInstruction*> use_it(instruction->GetUses());
Roland Levillain6b469232014-09-25 10:10:38 +0100150 !use_it.Done(); use_it.Advance()) {
151 HInstruction* use = use_it.Current()->GetUser();
152 const HInstructionList& list = use->IsPhi()
153 ? use->GetBlock()->GetPhis()
154 : use->GetBlock()->GetInstructions();
155 if (!list.Contains(use)) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000156 AddError(StringPrintf("User %d of instruction %d is not defined "
157 "in a basic block of the control-flow graph.",
158 use->GetId(),
159 instruction->GetId()));
Roland Levillain6b469232014-09-25 10:10:38 +0100160 }
161 }
Roland Levillainccc07a92014-09-16 14:48:16 +0100162}
163
164void SSAChecker::VisitBasicBlock(HBasicBlock* block) {
165 super_type::VisitBasicBlock(block);
166
167 // Ensure there is no critical edge (i.e., an edge connecting a
168 // block with multiple successors to a block with multiple
169 // predecessors).
170 if (block->GetSuccessors().Size() > 1) {
171 for (size_t j = 0; j < block->GetSuccessors().Size(); ++j) {
172 HBasicBlock* successor = block->GetSuccessors().Get(j);
173 if (successor->GetPredecessors().Size() > 1) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000174 AddError(StringPrintf("Critical edge between blocks %d and %d.",
175 block->GetBlockId(),
176 successor->GetBlockId()));
Roland Levillainccc07a92014-09-16 14:48:16 +0100177 }
178 }
179 }
Roland Levillain6b879dd2014-09-22 17:13:44 +0100180
181 if (block->IsLoopHeader()) {
182 CheckLoop(block);
183 }
184}
185
186void SSAChecker::CheckLoop(HBasicBlock* loop_header) {
187 int id = loop_header->GetBlockId();
188
189 // Ensure the pre-header block is first in the list of
190 // predecessors of a loop header.
191 if (!loop_header->IsLoopPreHeaderFirstPredecessor()) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000192 AddError(StringPrintf(
193 "Loop pre-header is not the first predecessor of the loop header %d.",
194 id));
Roland Levillain6b879dd2014-09-22 17:13:44 +0100195 }
196
197 // Ensure the loop header has only two predecessors and that only the
198 // second one is a back edge.
Roland Levillain5c4405e2015-01-21 11:39:58 +0000199 size_t num_preds = loop_header->GetPredecessors().Size();
200 if (num_preds < 2) {
201 AddError(StringPrintf(
202 "Loop header %d has less than two predecessors: %zu.",
203 id,
204 num_preds));
205 } else if (num_preds > 2) {
206 AddError(StringPrintf(
207 "Loop header %d has more than two predecessors: %zu.",
208 id,
209 num_preds));
Roland Levillain6b879dd2014-09-22 17:13:44 +0100210 } else {
211 HLoopInformation* loop_information = loop_header->GetLoopInformation();
212 HBasicBlock* first_predecessor = loop_header->GetPredecessors().Get(0);
213 if (loop_information->IsBackEdge(first_predecessor)) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000214 AddError(StringPrintf(
215 "First predecessor of loop header %d is a back edge.",
216 id));
Roland Levillain6b879dd2014-09-22 17:13:44 +0100217 }
218 HBasicBlock* second_predecessor = loop_header->GetPredecessors().Get(1);
219 if (!loop_information->IsBackEdge(second_predecessor)) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000220 AddError(StringPrintf(
221 "Second predecessor of loop header %d is not a back edge.",
222 id));
Roland Levillain6b879dd2014-09-22 17:13:44 +0100223 }
224 }
225
226 // Ensure there is only one back edge per loop.
227 size_t num_back_edges =
228 loop_header->GetLoopInformation()->GetBackEdges().Size();
Roland Levillain5c4405e2015-01-21 11:39:58 +0000229 if (num_back_edges == 0) {
230 AddError(StringPrintf(
231 "Loop defined by header %d has no back edge.",
232 id));
233 } else if (num_back_edges > 1) {
234 AddError(StringPrintf(
235 "Loop defined by header %d has several back edges: %zu.",
236 id,
237 num_back_edges));
Roland Levillain6b879dd2014-09-22 17:13:44 +0100238 }
Roland Levillain7e53b412014-09-23 10:50:22 +0100239
240 // Ensure all blocks in the loop are dominated by the loop header.
241 const ArenaBitVector& loop_blocks =
242 loop_header->GetLoopInformation()->GetBlocks();
243 for (uint32_t i : loop_blocks.Indexes()) {
244 HBasicBlock* loop_block = GetGraph()->GetBlocks().Get(i);
245 if (!loop_header->Dominates(loop_block)) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000246 AddError(StringPrintf("Loop block %d not dominated by loop header %d.",
247 loop_block->GetBlockId(),
248 id));
Roland Levillain7e53b412014-09-23 10:50:22 +0100249 }
250 }
Roland Levillainccc07a92014-09-16 14:48:16 +0100251}
252
253void SSAChecker::VisitInstruction(HInstruction* instruction) {
254 super_type::VisitInstruction(instruction);
255
Roland Levillaina8069ce2014-10-01 10:48:29 +0100256 // Ensure an instruction dominates all its uses.
David Brazdiled596192015-01-23 10:39:45 +0000257 for (HUseIterator<HInstruction*> use_it(instruction->GetUses());
Roland Levillaina8069ce2014-10-01 10:48:29 +0100258 !use_it.Done(); use_it.Advance()) {
259 HInstruction* use = use_it.Current()->GetUser();
Roland Levillain6c82d402014-10-13 16:10:27 +0100260 if (!use->IsPhi() && !instruction->StrictlyDominates(use)) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000261 AddError(StringPrintf("Instruction %d in block %d does not dominate "
262 "use %d in block %d.",
263 instruction->GetId(), current_block_->GetBlockId(),
264 use->GetId(), use->GetBlock()->GetBlockId()));
Roland Levillainccc07a92014-09-16 14:48:16 +0100265 }
266 }
Roland Levillaina8069ce2014-10-01 10:48:29 +0100267
268 // Ensure an instruction having an environment is dominated by the
269 // instructions contained in the environment.
270 HEnvironment* environment = instruction->GetEnvironment();
271 if (environment != nullptr) {
272 for (size_t i = 0, e = environment->Size(); i < e; ++i) {
273 HInstruction* env_instruction = environment->GetInstructionAt(i);
274 if (env_instruction != nullptr
Roland Levillain6c82d402014-10-13 16:10:27 +0100275 && !env_instruction->StrictlyDominates(instruction)) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000276 AddError(StringPrintf("Instruction %d in environment of instruction %d "
277 "from block %d does not dominate instruction %d.",
278 env_instruction->GetId(),
279 instruction->GetId(),
280 current_block_->GetBlockId(),
281 instruction->GetId()));
Roland Levillaina8069ce2014-10-01 10:48:29 +0100282 }
283 }
284 }
Roland Levillainccc07a92014-09-16 14:48:16 +0100285}
286
Roland Levillain6b879dd2014-09-22 17:13:44 +0100287void SSAChecker::VisitPhi(HPhi* phi) {
288 VisitInstruction(phi);
289
290 // Ensure the first input of a phi is not itself.
291 if (phi->InputAt(0) == phi) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000292 AddError(StringPrintf("Loop phi %d in block %d is its own first input.",
293 phi->GetId(),
294 phi->GetBlock()->GetBlockId()));
Roland Levillain6b879dd2014-09-22 17:13:44 +0100295 }
296
Roland Levillain5c4405e2015-01-21 11:39:58 +0000297 // Ensure the number of inputs of a phi is the same as the number of
Roland Levillain6b879dd2014-09-22 17:13:44 +0100298 // its predecessors.
299 const GrowableArray<HBasicBlock*>& predecessors =
300 phi->GetBlock()->GetPredecessors();
301 if (phi->InputCount() != predecessors.Size()) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000302 AddError(StringPrintf(
303 "Phi %d in block %d has %zu inputs, "
304 "but block %d has %zu predecessors.",
305 phi->GetId(), phi->GetBlock()->GetBlockId(), phi->InputCount(),
306 phi->GetBlock()->GetBlockId(), predecessors.Size()));
Roland Levillain6b879dd2014-09-22 17:13:44 +0100307 } else {
308 // Ensure phi input at index I either comes from the Ith
309 // predecessor or from a block that dominates this predecessor.
310 for (size_t i = 0, e = phi->InputCount(); i < e; ++i) {
311 HInstruction* input = phi->InputAt(i);
312 HBasicBlock* predecessor = predecessors.Get(i);
313 if (!(input->GetBlock() == predecessor
314 || input->GetBlock()->Dominates(predecessor))) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000315 AddError(StringPrintf(
316 "Input %d at index %zu of phi %d from block %d is not defined in "
317 "predecessor number %zu nor in a block dominating it.",
318 input->GetId(), i, phi->GetId(), phi->GetBlock()->GetBlockId(),
319 i));
Roland Levillain6b879dd2014-09-22 17:13:44 +0100320 }
321 }
322 }
323}
324
Nicolas Geoffray31596742014-11-24 15:28:45 +0000325static Primitive::Type PrimitiveKind(Primitive::Type type) {
326 switch (type) {
327 case Primitive::kPrimBoolean:
328 case Primitive::kPrimByte:
329 case Primitive::kPrimShort:
330 case Primitive::kPrimChar:
331 case Primitive::kPrimInt:
332 return Primitive::kPrimInt;
333 default:
334 return type;
335 }
336}
337
Nicolas Geoffray9ee66182015-01-16 12:35:40 +0000338void SSAChecker::VisitIf(HIf* instruction) {
339 VisitInstruction(instruction);
340 HInstruction* input = instruction->InputAt(0);
341 if (input->IsIntConstant()) {
342 int value = input->AsIntConstant()->GetValue();
343 if (value != 0 && value != 1) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000344 AddError(StringPrintf(
345 "If instruction %d has a non-Boolean constant input "
346 "whose value is: %d.",
347 instruction->GetId(),
348 value));
Nicolas Geoffray9ee66182015-01-16 12:35:40 +0000349 }
350 } else if (instruction->InputAt(0)->GetType() != Primitive::kPrimBoolean) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000351 AddError(StringPrintf(
352 "If instruction %d has a non-Boolean input type: %s.",
353 instruction->GetId(),
354 Primitive::PrettyDescriptor(instruction->InputAt(0)->GetType())));
Nicolas Geoffray9ee66182015-01-16 12:35:40 +0000355 }
356}
357
Nicolas Geoffray31596742014-11-24 15:28:45 +0000358void SSAChecker::VisitCondition(HCondition* op) {
359 VisitInstruction(op);
Nicolas Geoffray31596742014-11-24 15:28:45 +0000360 if (op->GetType() != Primitive::kPrimBoolean) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000361 AddError(StringPrintf(
362 "Condition %s %d has a non-Boolean result type: %s.",
363 op->DebugName(), op->GetId(),
364 Primitive::PrettyDescriptor(op->GetType())));
Nicolas Geoffray31596742014-11-24 15:28:45 +0000365 }
Nicolas Geoffray9ee66182015-01-16 12:35:40 +0000366 HInstruction* lhs = op->InputAt(0);
367 HInstruction* rhs = op->InputAt(1);
Roland Levillainaecbd262015-01-19 12:44:01 +0000368 if (lhs->GetType() == Primitive::kPrimNot) {
369 if (!op->IsEqual() && !op->IsNotEqual()) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000370 AddError(StringPrintf(
371 "Condition %s %d uses an object as left-hand side input.",
372 op->DebugName(), op->GetId()));
Roland Levillainaecbd262015-01-19 12:44:01 +0000373 }
374 if (rhs->IsIntConstant() && rhs->AsIntConstant()->GetValue() != 0) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000375 AddError(StringPrintf(
376 "Condition %s %d compares an object with a non-zero integer: %d.",
377 op->DebugName(), op->GetId(),
378 rhs->AsIntConstant()->GetValue()));
Nicolas Geoffray9ee66182015-01-16 12:35:40 +0000379 }
Roland Levillainaecbd262015-01-19 12:44:01 +0000380 } else if (rhs->GetType() == Primitive::kPrimNot) {
381 if (!op->IsEqual() && !op->IsNotEqual()) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000382 AddError(StringPrintf(
383 "Condition %s %d uses an object as right-hand side input.",
384 op->DebugName(), op->GetId()));
Roland Levillainaecbd262015-01-19 12:44:01 +0000385 }
386 if (lhs->IsIntConstant() && lhs->AsIntConstant()->GetValue() != 0) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000387 AddError(StringPrintf(
388 "Condition %s %d compares a non-zero integer with an object: %d.",
389 op->DebugName(), op->GetId(),
390 lhs->AsIntConstant()->GetValue()));
Nicolas Geoffray9ee66182015-01-16 12:35:40 +0000391 }
392 } else if (PrimitiveKind(lhs->GetType()) != PrimitiveKind(rhs->GetType())) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000393 AddError(StringPrintf(
394 "Condition %s %d has inputs of different types: "
395 "%s, and %s.",
396 op->DebugName(), op->GetId(),
397 Primitive::PrettyDescriptor(lhs->GetType()),
398 Primitive::PrettyDescriptor(rhs->GetType())));
Nicolas Geoffray9ee66182015-01-16 12:35:40 +0000399 }
Nicolas Geoffray31596742014-11-24 15:28:45 +0000400}
401
402void SSAChecker::VisitBinaryOperation(HBinaryOperation* op) {
403 VisitInstruction(op);
404 if (op->IsUShr() || op->IsShr() || op->IsShl()) {
405 if (PrimitiveKind(op->InputAt(1)->GetType()) != Primitive::kPrimInt) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000406 AddError(StringPrintf(
407 "Shift operation %s %d has a non-int kind second input: "
408 "%s of type %s.",
409 op->DebugName(), op->GetId(),
410 op->InputAt(1)->DebugName(),
411 Primitive::PrettyDescriptor(op->InputAt(1)->GetType())));
Nicolas Geoffray31596742014-11-24 15:28:45 +0000412 }
413 } else {
414 if (PrimitiveKind(op->InputAt(1)->GetType()) != PrimitiveKind(op->InputAt(0)->GetType())) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000415 AddError(StringPrintf(
416 "Binary operation %s %d has inputs of different types: "
417 "%s, and %s.",
418 op->DebugName(), op->GetId(),
419 Primitive::PrettyDescriptor(op->InputAt(0)->GetType()),
420 Primitive::PrettyDescriptor(op->InputAt(1)->GetType())));
Nicolas Geoffray31596742014-11-24 15:28:45 +0000421 }
422 }
423
424 if (op->IsCompare()) {
425 if (op->GetType() != Primitive::kPrimInt) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000426 AddError(StringPrintf(
427 "Compare operation %d has a non-int result type: %s.",
428 op->GetId(),
429 Primitive::PrettyDescriptor(op->GetType())));
Nicolas Geoffray31596742014-11-24 15:28:45 +0000430 }
431 } else {
432 // Use the first input, so that we can also make this check for shift operations.
433 if (PrimitiveKind(op->GetType()) != PrimitiveKind(op->InputAt(0)->GetType())) {
Roland Levillain5c4405e2015-01-21 11:39:58 +0000434 AddError(StringPrintf(
435 "Binary operation %s %d has a result type different "
436 "from its input type: %s vs %s.",
437 op->DebugName(), op->GetId(),
438 Primitive::PrettyDescriptor(op->GetType()),
439 Primitive::PrettyDescriptor(op->InputAt(1)->GetType())));
Nicolas Geoffray31596742014-11-24 15:28:45 +0000440 }
441 }
442}
443
Roland Levillainccc07a92014-09-16 14:48:16 +0100444} // namespace art