Lines Matching defs:NewBB

1937 /// Update the SSA form.  NewBB contains instructions that are copied from BB.
1938 /// ValueMapping maps old values in BB to new ones in NewBB.
1939 void JumpThreadingPass::updateSSA(BasicBlock *BB, BasicBlock *NewBB,
1983 SSAUpdate.AddAvailableValue(NewBB, ValueMapping[&I]);
1998 /// Clone instructions in range [BI, BE) to NewBB. For PHI nodes, we only clone
2005 BasicBlock *NewBB,
2008 // copy of the block 'NewBB'. If there are PHI nodes in the source basic
2055 // Clone the phi nodes of the source basic block into NewBB. The resulting
2056 // phi nodes are trivial since NewBB only has one predecessor, but SSAUpdater
2059 PHINode *NewPN = PHINode::Create(PN->getType(), 1, PN->getName(), NewBB);
2079 // Clone the non-phi instructions of the source basic block into NewBB,
2085 New->insertInto(NewBB, NewBB->end());
2108 DbgMarker *EndMarker = NewBB->createMarker(NewBB->end());
2272 BasicBlock *NewBB =
2275 NewBB->moveAfter(PredBB);
2277 // Set the block frequency of NewBB.
2282 BFI->setBlockFreq(NewBB, NewBBFreq);
2286 // copy of the block 'NewBB'. If there are PHI nodes in PredBB, evaluate them
2289 cloneInstructions(ValueMapping, PredBB->begin(), PredBB->end(), NewBB,
2292 // Copy the edge probabilities from PredBB to NewBB.
2294 BPI->copyEdgeProbabilities(PredBB, NewBB);
2296 // Update the terminator of PredPredBB to jump to NewBB instead of PredBB.
2303 PredPredTerm->setSuccessor(i, NewBB);
2306 addPHINodeEntriesForMappedBlock(PredBBBranch->getSuccessor(0), PredBB, NewBB,
2308 addPHINodeEntriesForMappedBlock(PredBBBranch->getSuccessor(1), PredBB, NewBB,
2312 {{DominatorTree::Insert, NewBB, CondBr->getSuccessor(0)},
2313 {DominatorTree::Insert, NewBB, CondBr->getSuccessor(1)},
2314 {DominatorTree::Insert, PredPredBB, NewBB},
2317 updateSSA(PredBB, NewBB, ValueMapping);
2321 SimplifyInstructionsInBlock(NewBB, TLI);
2325 PredsToFactor.push_back(NewBB);
2399 BasicBlock *NewBB = BasicBlock::Create(BB->getContext(),
2402 NewBB->moveAfter(PredBB);
2404 // Set the block frequency of NewBB.
2409 BFI->setBlockFreq(NewBB, NewBBFreq);
2412 // Copy all the instructions from BB to NewBB except the terminator.
2414 cloneInstructions(ValueMapping, BB->begin(), std::prev(BB->end()), NewBB,
2417 // We didn't copy the terminator from BB over to NewBB, because there is now
2419 BranchInst *NewBI = BranchInst::Create(SuccBB, NewBB);
2423 // PHI nodes for NewBB now.
2424 addPHINodeEntriesForMappedBlock(SuccBB, BB, NewBB, ValueMapping);
2426 // Update the terminator of PredBB to jump to NewBB instead of BB. This
2433 PredTerm->setSuccessor(i, NewBB);
2437 DTU->applyUpdatesPermissive({{DominatorTree::Insert, NewBB, SuccBB},
2438 {DominatorTree::Insert, PredBB, NewBB},
2441 updateSSA(BB, NewBB, ValueMapping);
2446 SimplifyInstructionsInBlock(NewBB, TLI);
2449 updateBlockFreqAndEdgeWeight(PredBB, BB, NewBB, SuccBB, BFI, BPI, HasProfile);
2485 for (auto *NewBB : NewBBs) {
2487 Updates.push_back({DominatorTree::Insert, NewBB, BB});
2488 for (auto *Pred : predecessors(NewBB)) {
2490 Updates.push_back({DominatorTree::Insert, Pred, NewBB});
2491 if (BFI) // Update frequencies between Pred -> NewBB.
2494 if (BFI) // Apply the summed frequency to NewBB.
2495 BFI->setBlockFreq(NewBB, NewBBFreq);
2515 BasicBlock *NewBB,
2532 auto NewBBFreq = BFI->getBlockFreq(NewBB);
2748 // A new basic block, NewBB, is created and SI is converted to compare and
2757 // | NewBB
2763 BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "select.unfold",
2765 // Move the unconditional branch to NewBB.
2767 PredTerm->insertInto(NewBB, NewBB->end());
2769 auto *BI = BranchInst::Create(NewBB, BB, SI->getCondition(), Pred);
2773 SIUse->addIncoming(SI->getTrueValue(), NewBB);
2789 // Set the block frequency of NewBB.
2798 BFI->setBlockFreq(NewBB, NewBBFreq);
2803 DTU->applyUpdatesPermissive({{DominatorTree::Insert, NewBB, BB},
2804 {DominatorTree::Insert, Pred, NewBB}});
2810 Phi->addIncoming(Phi->getIncomingValueForBlock(Pred), NewBB);
2970 BasicBlock *NewBB = Term->getParent();
2977 // NewBB and SplitBB are newly created blocks which require insertion.
2981 Updates.push_back({DominatorTree::Insert, BB, NewBB});
2982 Updates.push_back({DominatorTree::Insert, NewBB, SplitBB});