Lines Matching defs:NewBB

1938 /// Update the SSA form.  NewBB contains instructions that are copied from BB.
1939 /// ValueMapping maps old values in BB to new ones in NewBB.
1940 void JumpThreadingPass::updateSSA(BasicBlock *BB, BasicBlock *NewBB,
1984 SSAUpdate.AddAvailableValue(NewBB, ValueMapping[&I]);
1999 /// Clone instructions in range [BI, BE) to NewBB. For PHI nodes, we only clone
2006 BasicBlock *NewBB,
2009 // copy of the block 'NewBB'. If there are PHI nodes in the source basic
2056 // Clone the phi nodes of the source basic block into NewBB. The resulting
2057 // phi nodes are trivial since NewBB only has one predecessor, but SSAUpdater
2060 PHINode *NewPN = PHINode::Create(PN->getType(), 1, PN->getName(), NewBB);
2080 // Clone the non-phi instructions of the source basic block into NewBB,
2086 New->insertInto(NewBB, NewBB->end());
2109 DbgMarker *EndMarker = NewBB->createMarker(NewBB->end());
2275 BasicBlock *NewBB =
2278 NewBB->moveAfter(PredBB);
2280 // Set the block frequency of NewBB.
2285 BFI->setBlockFreq(NewBB, NewBBFreq);
2289 // copy of the block 'NewBB'. If there are PHI nodes in PredBB, evaluate them
2292 cloneInstructions(ValueMapping, PredBB->begin(), PredBB->end(), NewBB,
2295 // Copy the edge probabilities from PredBB to NewBB.
2297 BPI->copyEdgeProbabilities(PredBB, NewBB);
2299 // Update the terminator of PredPredBB to jump to NewBB instead of PredBB.
2306 PredPredTerm->setSuccessor(i, NewBB);
2309 addPHINodeEntriesForMappedBlock(PredBBBranch->getSuccessor(0), PredBB, NewBB,
2311 addPHINodeEntriesForMappedBlock(PredBBBranch->getSuccessor(1), PredBB, NewBB,
2315 {{DominatorTree::Insert, NewBB, CondBr->getSuccessor(0)},
2316 {DominatorTree::Insert, NewBB, CondBr->getSuccessor(1)},
2317 {DominatorTree::Insert, PredPredBB, NewBB},
2320 updateSSA(PredBB, NewBB, ValueMapping);
2324 SimplifyInstructionsInBlock(NewBB, TLI);
2328 PredsToFactor.push_back(NewBB);
2402 BasicBlock *NewBB = BasicBlock::Create(BB->getContext(),
2405 NewBB->moveAfter(PredBB);
2407 // Set the block frequency of NewBB.
2412 BFI->setBlockFreq(NewBB, NewBBFreq);
2415 // Copy all the instructions from BB to NewBB except the terminator.
2417 cloneInstructions(ValueMapping, BB->begin(), std::prev(BB->end()), NewBB,
2420 // We didn't copy the terminator from BB over to NewBB, because there is now
2422 BranchInst *NewBI = BranchInst::Create(SuccBB, NewBB);
2426 // PHI nodes for NewBB now.
2427 addPHINodeEntriesForMappedBlock(SuccBB, BB, NewBB, ValueMapping);
2429 // Update the terminator of PredBB to jump to NewBB instead of BB. This
2436 PredTerm->setSuccessor(i, NewBB);
2440 DTU->applyUpdatesPermissive({{DominatorTree::Insert, NewBB, SuccBB},
2441 {DominatorTree::Insert, PredBB, NewBB},
2444 updateSSA(BB, NewBB, ValueMapping);
2449 SimplifyInstructionsInBlock(NewBB, TLI);
2452 updateBlockFreqAndEdgeWeight(PredBB, BB, NewBB, SuccBB, BFI, BPI, HasProfile);
2488 for (auto *NewBB : NewBBs) {
2490 Updates.push_back({DominatorTree::Insert, NewBB, BB});
2491 for (auto *Pred : predecessors(NewBB)) {
2493 Updates.push_back({DominatorTree::Insert, Pred, NewBB});
2494 if (BFI) // Update frequencies between Pred -> NewBB.
2497 if (BFI) // Apply the summed frequency to NewBB.
2498 BFI->setBlockFreq(NewBB, NewBBFreq);
2518 BasicBlock *NewBB,
2535 auto NewBBFreq = BFI->getBlockFreq(NewBB);
2751 // A new basic block, NewBB, is created and SI is converted to compare and
2760 // | NewBB
2766 BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "select.unfold",
2768 // Move the unconditional branch to NewBB.
2770 PredTerm->insertInto(NewBB, NewBB->end());
2772 auto *BI = BranchInst::Create(NewBB, BB, SI->getCondition(), Pred);
2776 SIUse->addIncoming(SI->getTrueValue(), NewBB);
2792 // Set the block frequency of NewBB.
2801 BFI->setBlockFreq(NewBB, NewBBFreq);
2806 DTU->applyUpdatesPermissive({{DominatorTree::Insert, NewBB, BB},
2807 {DominatorTree::Insert, Pred, NewBB}});
2813 Phi->addIncoming(Phi->getIncomingValueForBlock(Pred), NewBB);
2973 BasicBlock *NewBB = Term->getParent();
2980 // NewBB and SplitBB are newly created blocks which require insertion.
2984 Updates.push_back({DominatorTree::Insert, BB, NewBB});
2985 Updates.push_back({DominatorTree::Insert, NewBB, SplitBB});