Lines Matching defs:MPhi
380 auto *MPhi = MSSA->getMemoryAccess(BBIDF);
381 if (!MPhi) {
382 MPhi = MSSA->createMemoryPhi(BBIDF);
383 NewInsertedPHIs.push_back(MPhi);
385 ExistingPhis.insert(MPhi);
393 NonOptPhis.insert(MPhi);
395 for (auto &MPhi : NewInsertedPHIs) {
396 auto *BBIDF = MPhi->getBlock();
399 MPhi->addIncoming(getPreviousDefFromEnd(Pred, CachedPreviousDef), Pred);
406 for (auto &MPhi : NewInsertedPHIs) {
407 InsertedPHIs.push_back(&*MPhi);
408 FixupList.push_back(&*MPhi);
532 if (MemoryPhi *MPhi = MSSA->getMemoryAccess(To)) {
533 MPhi->unorderedDeleteIncomingBlock(From);
534 tryRemoveTrivialPhi(MPhi);
540 if (MemoryPhi *MPhi = MSSA->getMemoryAccess(To)) {
542 MPhi->unorderedDeleteIncomingIf([&](const MemoryAccess *, BasicBlock *B) {
550 tryRemoveTrivialPhi(MPhi);
632 auto *MPhi = MSSA->getMemoryAccess(Header);
633 if (!MPhi)
637 // incoming values as MPhi. Skip incoming values coming from Preheader.
641 for (unsigned I = 0, E = MPhi->getNumIncomingValues(); I != E; ++I) {
642 BasicBlock *IBB = MPhi->getIncomingBlock(I);
643 MemoryAccess *IV = MPhi->getIncomingValue(I);
655 // Update incoming edges into MPhi. Remove all but the incoming edge from
657 auto *AccFromPreheader = MPhi->getIncomingValueForBlock(Preheader);
658 MPhi->setIncomingValue(0, AccFromPreheader);
659 MPhi->setIncomingBlock(0, Preheader);
660 for (unsigned I = MPhi->getNumIncomingValues() - 1; I >= 1; --I)
661 MPhi->unorderedDeleteIncoming(I);
662 MPhi->addIncoming(NewMPhi, BEBlock);
664 // If NewMPhi is a trivial phi, remove it. Its use in the header MPhi will be
722 if (MemoryPhi *MPhi = MSSA->getMemoryAccess(BB)) {
724 MPhiMap[MPhi] = NewPhi;
734 if (MemoryPhi *MPhi = MSSA->getMemoryAccess(BB))
735 if (MemoryAccess *NewPhi = MPhiMap.lookup(MPhi))
736 FixPhiIncomingValues(MPhi, cast<MemoryPhi>(NewPhi));
750 if (MemoryPhi *MPhi = MSSA->getMemoryAccess(BB))
751 MPhiMap[MPhi] = MPhi->getIncomingValueForBlock(P1);
1080 if (auto *MPhi = cast_or_null<MemoryPhi>(VH))
1081 BlocksToProcess.push_back(MPhi->getBlock());
1239 if (MemoryPhi *MPhi = MSSA->getMemoryAccess(Succ))
1240 MPhi->setIncomingBlock(MPhi->getBasicBlockIndex(From), To);
1249 if (MemoryPhi *MPhi = MSSA->getMemoryAccess(Succ))
1250 MPhi->setIncomingBlock(MPhi->getBasicBlockIndex(From), To);
1389 if (auto *MPhi = cast_or_null<MemoryPhi>(VH))
1390 tryRemoveTrivialPhi(MPhi);
1405 if (MemoryPhi *MPhi = MSSA->getMemoryAccess(Successor)) {
1406 MPhi->unorderedDeleteIncomingBlock(BB);
1407 UpdatedPHIs.push_back(MPhi);