Lines Matching refs:CG
125 LazyCallGraph CG(*M); in TEST() local
130 auto I = CG.begin(); in TEST()
155 EXPECT_EQ(CG.end(), I); in TEST()
206 auto SCCI = CG.postorder_scc_begin(); in TEST()
268 EXPECT_EQ(CG.postorder_scc_end(), SCCI); in TEST()
294 LazyCallGraph CG(*M); in TEST() local
296 LazyCallGraph::Node &A = CG.get(lookupFunction(*M, "a")); in TEST()
297 LazyCallGraph::Node &B = CG.get(lookupFunction(*M, "b")); in TEST()
301 CG.insertEdge(B, lookupFunction(*M, "c")); in TEST()
306 CG.insertEdge(C, B.getFunction()); in TEST()
310 CG.insertEdge(C, C.getFunction()); in TEST()
315 CG.removeEdge(C, B.getFunction()); in TEST()
319 CG.removeEdge(C, C.getFunction()); in TEST()
322 CG.removeEdge(B, C.getFunction()); in TEST()
357 LazyCallGraph CG(*M); in TEST() local
360 auto SCCI = CG.postorder_scc_begin(); in TEST()
362 EXPECT_EQ(CG.postorder_scc_end(), SCCI); in TEST()
364 LazyCallGraph::Node &A = *CG.lookup(lookupFunction(*M, "a")); in TEST()
365 LazyCallGraph::Node &B = *CG.lookup(lookupFunction(*M, "b")); in TEST()
366 LazyCallGraph::Node &C = *CG.lookup(lookupFunction(*M, "c")); in TEST()
367 LazyCallGraph::Node &D = *CG.lookup(lookupFunction(*M, "d")); in TEST()
368 LazyCallGraph::Node &E = *CG.lookup(lookupFunction(*M, "e")); in TEST()
369 EXPECT_EQ(&SCC, CG.lookupSCC(A)); in TEST()
370 EXPECT_EQ(&SCC, CG.lookupSCC(B)); in TEST()
371 EXPECT_EQ(&SCC, CG.lookupSCC(C)); in TEST()
372 EXPECT_EQ(&SCC, CG.lookupSCC(D)); in TEST()
373 EXPECT_EQ(&SCC, CG.lookupSCC(E)); in TEST()
398 LazyCallGraph CG(*M); in TEST() local
401 for (LazyCallGraph::SCC &C : CG.postorder_sccs()) in TEST()
404 LazyCallGraph::Node &A = *CG.lookup(lookupFunction(*M, "a")); in TEST()
405 LazyCallGraph::Node &B = *CG.lookup(lookupFunction(*M, "b")); in TEST()
406 LazyCallGraph::Node &C = *CG.lookup(lookupFunction(*M, "c")); in TEST()
407 LazyCallGraph::Node &D = *CG.lookup(lookupFunction(*M, "d")); in TEST()
408 LazyCallGraph::SCC &AC = *CG.lookupSCC(A); in TEST()
409 LazyCallGraph::SCC &BC = *CG.lookupSCC(B); in TEST()
410 LazyCallGraph::SCC &CC = *CG.lookupSCC(C); in TEST()
411 LazyCallGraph::SCC &DC = *CG.lookupSCC(D); in TEST()
423 EXPECT_EQ(&AC, CG.lookupSCC(A)); in TEST()
424 EXPECT_EQ(&BC, CG.lookupSCC(B)); in TEST()
425 EXPECT_EQ(&CC, CG.lookupSCC(C)); in TEST()
426 EXPECT_EQ(&DC, CG.lookupSCC(D)); in TEST()
447 LazyCallGraph CG(*M); in TEST() local
450 for (LazyCallGraph::SCC &C : CG.postorder_sccs()) in TEST()
453 LazyCallGraph::Node &A1 = *CG.lookup(lookupFunction(*M, "a1")); in TEST()
454 LazyCallGraph::Node &A2 = *CG.lookup(lookupFunction(*M, "a2")); in TEST()
455 LazyCallGraph::Node &A3 = *CG.lookup(lookupFunction(*M, "a3")); in TEST()
456 LazyCallGraph::Node &B1 = *CG.lookup(lookupFunction(*M, "b1")); in TEST()
457 LazyCallGraph::Node &B2 = *CG.lookup(lookupFunction(*M, "b2")); in TEST()
458 LazyCallGraph::Node &B3 = *CG.lookup(lookupFunction(*M, "b3")); in TEST()
459 LazyCallGraph::Node &C1 = *CG.lookup(lookupFunction(*M, "c1")); in TEST()
460 LazyCallGraph::Node &C2 = *CG.lookup(lookupFunction(*M, "c2")); in TEST()
461 LazyCallGraph::Node &C3 = *CG.lookup(lookupFunction(*M, "c3")); in TEST()
462 LazyCallGraph::Node &D1 = *CG.lookup(lookupFunction(*M, "d1")); in TEST()
463 LazyCallGraph::Node &D2 = *CG.lookup(lookupFunction(*M, "d2")); in TEST()
464 LazyCallGraph::Node &D3 = *CG.lookup(lookupFunction(*M, "d3")); in TEST()
465 LazyCallGraph::SCC &AC = *CG.lookupSCC(A1); in TEST()
466 LazyCallGraph::SCC &BC = *CG.lookupSCC(B1); in TEST()
467 LazyCallGraph::SCC &CC = *CG.lookupSCC(C1); in TEST()
468 LazyCallGraph::SCC &DC = *CG.lookupSCC(D1); in TEST()
469 ASSERT_EQ(&AC, CG.lookupSCC(A2)); in TEST()
470 ASSERT_EQ(&AC, CG.lookupSCC(A3)); in TEST()
471 ASSERT_EQ(&BC, CG.lookupSCC(B2)); in TEST()
472 ASSERT_EQ(&BC, CG.lookupSCC(B3)); in TEST()
473 ASSERT_EQ(&CC, CG.lookupSCC(C2)); in TEST()
474 ASSERT_EQ(&CC, CG.lookupSCC(C3)); in TEST()
475 ASSERT_EQ(&DC, CG.lookupSCC(D2)); in TEST()
476 ASSERT_EQ(&DC, CG.lookupSCC(D3)); in TEST()
497 EXPECT_EQ(&AC, CG.lookupSCC(A1)); in TEST()
498 EXPECT_EQ(&AC, CG.lookupSCC(A2)); in TEST()
499 EXPECT_EQ(&AC, CG.lookupSCC(A3)); in TEST()
500 EXPECT_EQ(&BC, CG.lookupSCC(B1)); in TEST()
501 EXPECT_EQ(&BC, CG.lookupSCC(B2)); in TEST()
502 EXPECT_EQ(&BC, CG.lookupSCC(B3)); in TEST()
503 EXPECT_EQ(&CC, CG.lookupSCC(C1)); in TEST()
504 EXPECT_EQ(&CC, CG.lookupSCC(C2)); in TEST()
505 EXPECT_EQ(&CC, CG.lookupSCC(C3)); in TEST()
506 EXPECT_EQ(&CC, CG.lookupSCC(D1)); in TEST()
507 EXPECT_EQ(&CC, CG.lookupSCC(D2)); in TEST()
508 EXPECT_EQ(&CC, CG.lookupSCC(D3)); in TEST()
522 LazyCallGraph CG(*M); in TEST() local
525 auto SCCI = CG.postorder_scc_begin(), SCCE = CG.postorder_scc_end(); in TEST()
534 ASSERT_EQ(nullptr, CG.lookup(lookupFunction(*M, "a1"))); in TEST()
535 ASSERT_EQ(nullptr, CG.lookup(lookupFunction(*M, "a2"))); in TEST()
536 ASSERT_EQ(nullptr, CG.lookup(lookupFunction(*M, "a3"))); in TEST()
537 ASSERT_EQ(nullptr, CG.lookup(lookupFunction(*M, "b1"))); in TEST()
538 ASSERT_EQ(nullptr, CG.lookup(lookupFunction(*M, "b2"))); in TEST()
539 ASSERT_EQ(nullptr, CG.lookup(lookupFunction(*M, "b3"))); in TEST()
540 LazyCallGraph::Node &C1 = *CG.lookup(lookupFunction(*M, "c1")); in TEST()
541 LazyCallGraph::Node &C2 = *CG.lookup(lookupFunction(*M, "c2")); in TEST()
542 LazyCallGraph::Node &C3 = *CG.lookup(lookupFunction(*M, "c3")); in TEST()
543 LazyCallGraph::Node &D1 = *CG.lookup(lookupFunction(*M, "d1")); in TEST()
544 LazyCallGraph::Node &D2 = *CG.lookup(lookupFunction(*M, "d2")); in TEST()
545 LazyCallGraph::Node &D3 = *CG.lookup(lookupFunction(*M, "d3")); in TEST()
546 ASSERT_EQ(&CC, CG.lookupSCC(C1)); in TEST()
547 ASSERT_EQ(&CC, CG.lookupSCC(C2)); in TEST()
548 ASSERT_EQ(&CC, CG.lookupSCC(C3)); in TEST()
549 ASSERT_EQ(&DC, CG.lookupSCC(D1)); in TEST()
550 ASSERT_EQ(&DC, CG.lookupSCC(D2)); in TEST()
551 ASSERT_EQ(&DC, CG.lookupSCC(D3)); in TEST()
558 EXPECT_EQ(&CC, CG.lookupSCC(C1)); in TEST()
559 EXPECT_EQ(&CC, CG.lookupSCC(C2)); in TEST()
560 EXPECT_EQ(&CC, CG.lookupSCC(C3)); in TEST()
561 EXPECT_EQ(&CC, CG.lookupSCC(D1)); in TEST()
562 EXPECT_EQ(&CC, CG.lookupSCC(D2)); in TEST()
563 EXPECT_EQ(&CC, CG.lookupSCC(D3)); in TEST()
570 EXPECT_EQ(&BC, CG.lookupSCC(*CG.lookup(lookupFunction(*M, "b1")))); in TEST()
571 EXPECT_EQ(&BC, CG.lookupSCC(*CG.lookup(lookupFunction(*M, "b2")))); in TEST()
572 EXPECT_EQ(&BC, CG.lookupSCC(*CG.lookup(lookupFunction(*M, "b3")))); in TEST()
577 EXPECT_EQ(&AC, CG.lookupSCC(*CG.lookup(lookupFunction(*M, "a1")))); in TEST()
578 EXPECT_EQ(&AC, CG.lookupSCC(*CG.lookup(lookupFunction(*M, "a2")))); in TEST()
579 EXPECT_EQ(&AC, CG.lookupSCC(*CG.lookup(lookupFunction(*M, "a3")))); in TEST()
595 LazyCallGraph CG(*M); in TEST() local
598 for (LazyCallGraph::SCC &C : CG.postorder_sccs()) in TEST()
601 LazyCallGraph::Node &A = *CG.lookup(lookupFunction(*M, "a")); in TEST()
602 LazyCallGraph::Node &B = *CG.lookup(lookupFunction(*M, "b")); in TEST()
603 LazyCallGraph::SCC &AC = *CG.lookupSCC(A); in TEST()
604 LazyCallGraph::SCC &BC = *CG.lookupSCC(B); in TEST()