Lines Matching refs:graph
61 explicit NewABReducer(Graph* graph) : graph_(graph) {} in NewABReducer() argument
107 explicit A0Wrapper(Graph* graph) : graph_(graph) {} in A0Wrapper() argument
123 explicit B0Wrapper(Graph* graph) : graph_(graph) {} in B0Wrapper() argument
199 GraphTester graph; in TEST() local
201 Node* n1 = graph.NewNode(&OPA0); in TEST()
202 Node* end = graph.NewNode(&OPA1, n1); in TEST()
203 graph.SetEnd(end); in TEST()
205 GraphReducer reducer(&graph); in TEST()
206 ReducerRecorder recorder(graph.zone()); in TEST()
215 GraphTester graph; in TEST() local
217 Node* n1 = graph.NewNode(&OPA0); in TEST()
218 Node* n2 = graph.NewNode(&OPA1, n1); in TEST()
219 Node* n3 = graph.NewNode(&OPA1, n1); in TEST()
220 Node* end = graph.NewNode(&OPA2, n2, n3); in TEST()
221 graph.SetEnd(end); in TEST()
223 GraphReducer reducer(&graph); in TEST()
224 ReducerRecorder recorder(graph.zone()); in TEST()
235 GraphTester graph; in TEST() local
237 Node* n1 = graph.NewNode(&OPA0); in TEST()
238 Node* end = graph.NewNode(&OPA1, n1); in TEST()
239 graph.SetEnd(end); in TEST()
241 GraphReducer reducer(&graph); in TEST()
247 int before = graph.NodeCount(); in TEST()
249 CHECK_EQ(before, graph.NodeCount()); in TEST()
258 GraphTester graph; in TEST() local
260 Node* n1 = graph.NewNode(&OPA0); in TEST()
261 Node* n2 = graph.NewNode(&OPA1, n1); in TEST()
262 Node* n3 = graph.NewNode(&OPA1, n1); in TEST()
263 Node* end = graph.NewNode(&OPA2, n2, n3); in TEST()
264 graph.SetEnd(end); in TEST()
266 GraphReducer reducer(&graph); in TEST()
272 int before = graph.NodeCount(); in TEST()
274 CHECK_EQ(before, graph.NodeCount()); in TEST()
288 GraphTester graph; in TEST() local
290 Node* n1 = graph.NewNode(&OPA0); in TEST()
291 Node* n2 = graph.NewNode(&OPA1, n1); in TEST()
292 Node* n3 = graph.NewNode(&OPA1, n1); in TEST()
293 Node* end = graph.NewNode(&OPA2, n2, n3); in TEST()
294 graph.SetEnd(end); in TEST()
296 GraphReducer reducer(&graph); in TEST()
297 NewABReducer r(&graph); in TEST()
302 int before = graph.NodeCount(); in TEST()
305 CHECK_NE(before, graph.NodeCount()); in TEST()
307 CHECK_EQ(before, graph.NodeCount()); in TEST()
309 Node* nend = graph.end(); in TEST()
327 GraphTester graph; in TEST() local
329 Node* end = graph.NewNode(&OPA0); in TEST()
330 graph.SetEnd(end); in TEST()
331 CHECK_EQ(1, graph.NodeCount()); in TEST()
333 GraphReducer reducer(&graph); in TEST()
334 A0Wrapper r(&graph); in TEST()
338 CHECK_EQ(2, graph.NodeCount()); in TEST()
340 Node* nend = graph.end(); in TEST()
349 GraphTester graph; in TEST() local
351 Node* end = graph.NewNode(&OPB0); in TEST()
352 graph.SetEnd(end); in TEST()
353 CHECK_EQ(1, graph.NodeCount()); in TEST()
355 GraphReducer reducer(&graph); in TEST()
356 B0Wrapper r(&graph); in TEST()
360 CHECK_EQ(3, graph.NodeCount()); in TEST()
362 Node* nend = graph.end(); in TEST()
376 GraphTester graph; in TEST() local
378 Node* n1 = graph.NewNode(&OPA0); in TEST()
379 Node* end = graph.NewNode(&OPA1, n1); in TEST()
380 graph.SetEnd(end); in TEST()
382 GraphReducer reducer(&graph); in TEST()
388 int before = graph.NodeCount(); in TEST()
390 CHECK_EQ(before, graph.NodeCount()); in TEST()
392 CHECK_EQ(n1, graph.end()); in TEST()
398 GraphTester graph; in TEST() local
400 Node* n1 = graph.NewNode(&OPA0); in TEST()
401 Node* n2 = graph.NewNode(&OPA1, n1); in TEST()
402 Node* n3 = graph.NewNode(&OPA1, n1); in TEST()
403 Node* end = graph.NewNode(&OPA2, n2, n3); in TEST()
404 graph.SetEnd(end); in TEST()
406 GraphReducer reducer(&graph); in TEST()
412 int before = graph.NodeCount(); in TEST()
414 CHECK_EQ(before, graph.NodeCount()); in TEST()
428 GraphTester graph; in TEST() local
430 Node* n1 = graph.NewNode(&OPA0); in TEST()
433 end = graph.NewNode(&OPA1, end); in TEST()
435 graph.SetEnd(end); in TEST()
437 GraphReducer reducer(&graph); in TEST()
442 int before = graph.NodeCount(); in TEST()
444 CHECK_EQ(before, graph.NodeCount()); in TEST()
446 CHECK_EQ(n1, graph.end()); in TEST()
453 GraphTester graph; in TEST() local
455 Node* n1 = graph.NewNode(&OPA0); in TEST()
456 Node* n2 = graph.NewNode(&OPA1, n1); in TEST()
457 Node* n3 = graph.NewNode(&OPA1, n1); in TEST()
458 Node* end = graph.NewNode(&OPA2, n2, n3); in TEST()
459 graph.SetEnd(end); in TEST()
461 GraphReducer reducer(&graph); in TEST()
469 int before = graph.NodeCount(); in TEST()
471 CHECK_EQ(before, graph.NodeCount()); in TEST()
488 GraphTester graph; in TEST() local
490 Node* n1 = graph.NewNode(&OPA0); in TEST()
491 Node* n2 = graph.NewNode(&OPA1, n1); in TEST()
492 Node* n3 = graph.NewNode(&OPA1, n1); in TEST()
495 if (i == 0) end = graph.NewNode(&OPA2, n2, n3); in TEST()
496 if (i == 1) end = graph.NewNode(&OPA2, n3, n2); in TEST()
497 if (i == 2) end = graph.NewNode(&OPA2, n2, n1); in TEST()
498 if (i == 3) end = graph.NewNode(&OPA2, n1, n2); in TEST()
499 if (i == 4) end = graph.NewNode(&OPA2, n3, n1); in TEST()
500 if (i == 5) end = graph.NewNode(&OPA2, n1, n3); in TEST()
502 graph.SetEnd(end); in TEST()
504 GraphReducer reducer(&graph); in TEST()
507 int before = graph.NodeCount(); in TEST()
509 CHECK_EQ(before, graph.NodeCount()); in TEST()
514 CHECK_EQ(end, graph.end()); in TEST()
521 void GenDAG(Graph* graph, int* p3, int* p2, int* p1) { in GenDAG() argument
522 Node* level4 = graph->NewNode(&OPA0); in GenDAG()
523 Node* level3[] = {graph->NewNode(&OPA1, level4), in GenDAG()
524 graph->NewNode(&OPA1, level4)}; in GenDAG()
526 Node* level2[] = {graph->NewNode(&OPA1, level3[p3[0]]), in GenDAG()
527 graph->NewNode(&OPA1, level3[p3[1]]), in GenDAG()
528 graph->NewNode(&OPA1, level3[p3[0]]), in GenDAG()
529 graph->NewNode(&OPA1, level3[p3[1]])}; in GenDAG()
531 Node* level1[] = {graph->NewNode(&OPA2, level2[p2[0]], level2[p2[1]]), in GenDAG()
532 graph->NewNode(&OPA2, level2[p2[2]], level2[p2[3]])}; in GenDAG()
534 Node* end = graph->NewNode(&OPA2, level1[p1[0]], level1[p1[1]]); in GenDAG()
535 graph->SetEnd(end); in GenDAG()
540 GraphTester graph; in TEST() local
561 GenDAG(&graph, p3, p2, p1); in TEST()
563 GraphReducer reducer(&graph); in TEST()
573 Node* end = graph.end(); in TEST()
596 GraphTester graph; in TEST() local
598 Node* n1 = graph.NewNode(&OPA0); in TEST()
599 Node* end = graph.NewNode(&OPA1, n1); in TEST()
600 graph.SetEnd(end); in TEST()
602 GraphReducer reducer(&graph); in TEST()
615 int before = graph.NodeCount(); in TEST()
617 CHECK_EQ(before, graph.NodeCount()); in TEST()
643 GraphTester graph; in TEST() local
645 Node* n1 = graph.NewNode(&OPA0); in TEST()
646 Node* end = graph.NewNode(&OPA1, n1); in TEST()
647 graph.SetEnd(end); in TEST()
649 GraphReducer reducer(&graph); in TEST()
651 OneTimeReducer once(&r, graph.zone()); in TEST()
655 int before = graph.NodeCount(); in TEST()
657 CHECK_EQ(before, graph.NodeCount()); in TEST()