/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | MachineLoopUtils.cpp | 38 MachineBasicBlock *NewBB = MF.CreateMachineBasicBlock(Loop->getBasicBlock()); in PeelSingleBlockLoop() local 40 MF.insert(Loop->getIterator(), NewBB); in PeelSingleBlockLoop() 42 MF.insert(std::next(Loop->getIterator()), NewBB); in PeelSingleBlockLoop() 45 auto InsertPt = NewBB->end(); in PeelSingleBlockLoop() 48 NewBB->insert(InsertPt, NewMI); in PeelSingleBlockLoop() 77 for (auto I = NewBB->getFirstNonPHI(); I != NewBB->end(); ++I) in PeelSingleBlockLoop() 82 for (auto I = NewBB->begin(); I->isPHI(); ++I) { in PeelSingleBlockLoop() 110 Preheader->ReplaceUsesOfBlockWith(Loop, NewBB); in PeelSingleBlockLoop() 111 NewBB->addSuccessor(Loop); in PeelSingleBlockLoop() 112 Loop->replacePhiUsesWith(Preheader, NewBB); in PeelSingleBlockLoop() [all …]
|
H A D | BranchRelaxation.cpp | 254 MachineBasicBlock *NewBB = MF->CreateMachineBasicBlock(BB); in splitBlockBeforeInstr() 255 MF->insert(++OrigMBB.getIterator(), NewBB); in splitBlockBeforeInstr() 258 NewBB->setSectionID(OrigMBB.getSectionID()); in splitBlockBeforeInstr() 259 NewBB->setIsEndSection(OrigMBB.isEndSection()); in splitBlockBeforeInstr() 263 BlockInfo.insert(BlockInfo.begin() + NewBB->getNumber(), BasicBlockInfo()); in splitBlockBeforeInstr() 265 return NewBB; in splitBlockBeforeInstr() 277 MachineBasicBlock *NewBB = in splitBlockBeforeInstr() 279 MF->insert(++OrigBB->getIterator(), NewBB); in splitBlockBeforeInstr() 282 NewBB->setSectionID(OrigBB->getSectionID()); in splitBlockBeforeInstr() 283 NewBB in splitBlockBeforeInstr() 232 MachineBasicBlock *NewBB = MF->CreateMachineBasicBlock(BB); createNewBlockAfter() local 249 MachineBasicBlock *NewBB = splitBlockBeforeInstr() local 322 MachineBasicBlock *NewBB = nullptr; fixupConditionalBranch() local 348 __anon6cb7e2b90502(MachineBasicBlock *MBB, MachineBasicBlock *NewBB) fixupConditionalBranch() argument [all...] |
H A D | ModuloSchedule.cpp | 208 MachineBasicBlock *NewBB = MF.CreateMachineBasicBlock(BB->getBasicBlock()); in generateProlog() local 209 PrologBBs.push_back(NewBB); in generateProlog() 210 MF.insert(BB->getIterator(), NewBB); in generateProlog() 211 NewBB->transferSuccessors(PredBB); in generateProlog() 212 PredBB->addSuccessor(NewBB); in generateProlog() 213 PredBB = NewBB; in generateProlog() 214 LIS.insertMBBInMaps(NewBB); in generateProlog() 228 NewBB->push_back(NewMI); in generateProlog() 233 rewritePhiValues(NewBB, i, VRMap, InstrMap); in generateProlog() 236 NewBB->dump(); in generateProlog() [all …]
|
H A D | MachineDominators.cpp | 145 if (PredBB == Edge.NewBB) in applySplitCriticalEdges() 179 Edge.NewBB, Edge.FromBB); in applySplitCriticalEdges()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | BreakCriticalEdges.cpp | 168 BasicBlock *NewBB = nullptr; in SplitKnownCriticalEdge() local 170 NewBB = BasicBlock::Create(TI->getContext(), BBName); in SplitKnownCriticalEdge() 172 NewBB = BasicBlock::Create(TI->getContext(), TIBB->getName() + "." + in SplitKnownCriticalEdge() 176 BranchInst *NewBI = BranchInst::Create(DestBB, NewBB); in SplitKnownCriticalEdge() 182 F.insert(++FBBI, NewBB); in SplitKnownCriticalEdge() 185 TI->setSuccessor(SuccNum, NewBB); in SplitKnownCriticalEdge() 204 PN->setIncomingBlock(BBIdx, NewBB); in SplitKnownCriticalEdge() 219 TI->setSuccessor(i, NewBB); in SplitKnownCriticalEdge() 229 DestBB, NewBB, {TIBB}, Options.MergeIdenticalEdges); in SplitKnownCriticalEdge() 232 return NewBB; in SplitKnownCriticalEdge() [all …]
|
H A D | CloneFunction.cpp | 48 BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "", F); in CloneBasicBlock() local 49 NewBB->IsNewDbgInfoFormat = BB->IsNewDbgInfoFormat; in CloneBasicBlock() 51 NewBB->setName(BB->getName() + NameSuffix); in CloneBasicBlock() 65 NewInst->insertBefore(*NewBB, NewBB->end()); in CloneBasicBlock() 86 return NewBB; in CloneBasicBlock() 472 BasicBlock *NewBB; in CloneBlock() local 474 BBEntry = NewBB = BasicBlock::Create(BB->getContext(), NewName, NewFunc); in CloneBlock() 475 NewBB->IsNewDbgInfoFormat = BB->IsNewDbgInfoFormat; in CloneBlock() 489 VMap[OldBBAddr] = BlockAddress::get(NewFunc, NewBB); in CloneBlock() 498 [NewBB, &DbgCursor](Instruction *NewInst, BasicBlock::const_iterator II) { in CloneBlock() [all …]
|
H A D | BasicBlockUtils.cpp | 880 auto *NewBB = in ehAwareSplitEdge() local 882 setUnwindEdgeTo(BB->getTerminator(), NewBB); in ehAwareSplitEdge() 883 updatePhiNodes(Succ, BB, NewBB, LandingPadReplacement); in ehAwareSplitEdge() 887 auto *Terminator = BranchInst::Create(Succ, NewBB); in ehAwareSplitEdge() 889 LandingPadReplacement->addIncoming(NewLP, NewBB); in ehAwareSplitEdge() 903 auto *NewCleanupPad = CleanupPadInst::Create(ParentPad, {}, BBName, NewBB); in ehAwareSplitEdge() 904 CleanupReturnInst::Create(NewCleanupPad, Succ, NewBB); in ehAwareSplitEdge() 910 return NewBB; in ehAwareSplitEdge() 916 Updates.push_back({DominatorTree::Insert, BB, NewBB}); in ehAwareSplitEdge() 917 Updates.push_back({DominatorTree::Insert, NewBB, Succ}); in ehAwareSplitEdge() [all …]
|
H A D | LoopUnrollRuntime.cpp | 359 BasicBlock *NewBB = CloneBasicBlock(*BB, VMap, "." + suffix, F); in CloneLoopBlocks() local 360 NewBlocks.push_back(NewBB); in CloneLoopBlocks() 362 addClonedBlockToLoopInfo(*BB, NewBB, LI, NewLoops); in CloneLoopBlocks() 364 VMap[*BB] = NewBB; in CloneLoopBlocks() 368 InsertTop->getTerminator()->setSuccessor(0, NewBB); in CloneLoopBlocks() 374 DT->addNewBlock(NewBB, InsertTop); in CloneLoopBlocks() 378 DT->addNewBlock(NewBB, cast<BasicBlock>(VMap[IDomBB])); in CloneLoopBlocks() 389 BranchInst *LatchBR = cast<BranchInst>(NewBB->getTerminator()); in CloneLoopBlocks() 420 NewIdx->addIncoming(IdxNext, NewBB); in CloneLoopBlocks()
|
H A D | LoopSimplify.cpp | 81 static void placeSplitBlockCarefully(BasicBlock *NewBB, in placeSplitBlockCarefully() argument 85 Function::iterator BBI = --NewBB->getIterator(); in placeSplitBlockCarefully() 100 if (++BBI != NewBB->getParent()->end() && L->contains(&*BBI)) { in placeSplitBlockCarefully() 111 NewBB->moveAfter(FoundBB); in placeSplitBlockCarefully() 272 BasicBlock *NewBB = SplitBlockPredecessors(Header, OuterLoopPreds, ".outer", in separateNestedLoop() local 277 placeSplitBlockCarefully(NewBB, OuterLoopPreds, L); in separateNestedLoop() 316 OuterLoopBlocks.push_back(NewBB); in separateNestedLoop()
|
H A D | CodeExtractor.cpp | 696 BasicBlock *NewBB = SplitBlock(Header, Header->getFirstNonPHI(), DT); in severSplitPHINodesOfEntry() local 702 Blocks.insert(NewBB); in severSplitPHINodesOfEntry() 703 Header = NewBB; in severSplitPHINodesOfEntry() 714 TI->replaceUsesOfWith(OldPred, NewBB); in severSplitPHINodesOfEntry() 726 NewPN->insertBefore(NewBB->begin()); in severSplitPHINodesOfEntry() 750 BasicBlock *NewBB = nullptr; in severSplitPHINodesOfExits() local 767 if (!NewBB) { in severSplitPHINodesOfExits() 768 NewBB = BasicBlock::Create(ExitBB->getContext(), in severSplitPHINodesOfExits() 771 NewBB->IsNewDbgInfoFormat = ExitBB->IsNewDbgInfoFormat; in severSplitPHINodesOfExits() 775 PredBB->getTerminator()->replaceUsesOfWith(ExitBB, NewBB); in severSplitPHINodesOfExits() [all …]
|
H A D | LoopPeel.cpp | 769 BasicBlock *NewBB = CloneBasicBlock(*BB, VMap, ".peel", F); in cloneLoopBlocks() local 770 NewBlocks.push_back(NewBB); in cloneLoopBlocks() 776 ParentLoop->addBasicBlockToLoop(NewBB, *LI); in cloneLoopBlocks() 778 VMap[*BB] = NewBB; in cloneLoopBlocks() 783 DT->addNewBlock(NewBB, InsertTop); in cloneLoopBlocks() 787 DT->addNewBlock(NewBB, cast<BasicBlock>(VMap[IDom->getBlock()])); in cloneLoopBlocks()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/MSP430/ |
H A D | MSP430BranchSelector.cpp | 152 MachineBasicBlock *NewBB = in expandBranches() local 154 MF->insert(std::next(MBB), NewBB); in expandBranches() 157 NewBB->splice(NewBB->end(), &*MBB, std::next(MI), MBB->end()); in expandBranches() 164 MBB->replaceSuccessor(Succ, NewBB); in expandBranches() 165 NewBB->addSuccessor(Succ); in expandBranches()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | JumpThreading.cpp | 1940 void JumpThreadingPass::updateSSA(BasicBlock *BB, BasicBlock *NewBB, in updateSSA() argument 1984 SSAUpdate.AddAvailableValue(NewBB, ValueMapping[&I]); in updateSSA() 2006 BasicBlock *NewBB, in cloneInstructions() argument 2060 PHINode *NewPN = PHINode::Create(PN->getType(), 1, PN->getName(), NewBB); in cloneInstructions() 2086 New->insertInto(NewBB, NewBB->end()); in cloneInstructions() 2109 DbgMarker *EndMarker = NewBB->createMarker(NewBB->end()); in cloneInstructions() 2275 BasicBlock *NewBB = in threadThroughTwoBasicBlocks() local 2278 NewBB->moveAfter(PredBB); in threadThroughTwoBasicBlocks() 2285 BFI->setBlockFreq(NewBB, NewBBFreq); in threadThroughTwoBasicBlocks() 2292 cloneInstructions(ValueMapping, PredBB->begin(), PredBB->end(), NewBB, in threadThroughTwoBasicBlocks() [all …]
|
H A D | DFAJumpThreading.cpp | 313 for (BasicBlock *NewBB : *NewBBs) in unfold() 314 L->addBasicBlockToLoop(NewBB, *LI); in unfold() 975 BasicBlock *NewBB = cloneBlockAndUpdatePredecessor( in createExitPath() local 977 DuplicateMap[BB].push_back({NewBB, NextState}); in createExitPath() 978 BlocksToClean.insert(NewBB); in createExitPath() 979 PrevBB = NewBB; in createExitPath() 1047 BasicBlock *NewBB = CloneBasicBlock( in cloneBlockAndUpdatePredecessor() local 1050 NewBB->moveAfter(BB); in cloneBlockAndUpdatePredecessor() 1053 for (Instruction &I : *NewBB) { in cloneBlockAndUpdatePredecessor() 1065 updateSuccessorPhis(BB, NewBB, NextState, VMap, DuplicateMap); in cloneBlockAndUpdatePredecessor() [all …]
|
H A D | GVNHoist.cpp | 594 const BasicBlock *NewBB = NewPt->getParent(); in hasMemoryUse() local 606 if (BB == NewBB) { in hasMemoryUse() 641 const BasicBlock *NewBB = NewPt->getParent(); in hasEHOrLoadsOnPath() local 643 assert(DT->dominates(NewBB, OldBB) && "invalid path"); in hasEHOrLoadsOnPath() 644 assert(DT->dominates(Def->getDefiningAccess()->getBlock(), NewBB) && in hasEHOrLoadsOnPath() 653 if (BB == NewBB) { in hasEHOrLoadsOnPath() 713 const BasicBlock *NewBB = NewPt->getParent(); in safeToHoistLdSt() local 720 if (DT->properlyDominates(NewBB, DBB)) in safeToHoistLdSt() 724 if (NewBB == DBB && !MSSA->isLiveOnEntryDef(D)) in safeToHoistLdSt() 734 } else if (hasEHOnPath(NewBB, OldBB, NBBsOnAllPaths)) in safeToHoistLdSt() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/CSKY/ |
H A D | CSKYConstantIslandPass.cpp | 245 void updateForInsertedWaterBlock(MachineBasicBlock *NewBB); 621 MachineBasicBlock *NewBB) { in updateForInsertedWaterBlock() argument 623 NewBB->getParent()->RenumberBlocks(NewBB); in updateForInsertedWaterBlock() 627 BBInfo.insert(BBInfo.begin() + NewBB->getNumber(), BasicBlockInfo()); in updateForInsertedWaterBlock() 631 water_iterator IP = llvm::lower_bound(WaterList, NewBB, compareMbbNumbers); in updateForInsertedWaterBlock() 632 WaterList.insert(IP, NewBB); in updateForInsertedWaterBlock() 651 MachineBasicBlock *NewBB = in splitBlockBeforeInstr() local 654 MF->insert(MBBI, NewBB); in splitBlockBeforeInstr() 657 NewBB->splice(NewBB->end(), OrigBB, MI, OrigBB->end()); in splitBlockBeforeInstr() 665 BuildMI(OrigBB, DebugLoc(), TII->get(CSKY::BR32)).addMBB(NewBB); in splitBlockBeforeInstr() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | MachineDominators.h | 81 MachineBasicBlock *NewBB; member 235 void splitBlock(MachineBasicBlock* NewBB) { in splitBlock() argument 237 Base::splitBlock(NewBB); in splitBlock() 261 MachineBasicBlock *NewBB) { in recordSplitCriticalEdge() argument 262 bool Inserted = NewBBs.insert(NewBB).second; in recordSplitCriticalEdge() 266 CriticalEdgesToSplit.push_back({FromBB, ToBB, NewBB}); in recordSplitCriticalEdge()
|
H A D | ModuloSchedule.h | 198 void generateExistingPhis(MachineBasicBlock *NewBB, MachineBasicBlock *BB1, 203 void generatePhis(MachineBasicBlock *NewBB, MachineBasicBlock *BB1, 228 void rewritePhiValues(MachineBasicBlock *NewBB, unsigned StageNum,
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
H A D | VPlan.cpp | 415 BasicBlock *NewBB = BasicBlock::Create(PrevBB->getContext(), getName(), in createEmptyBasicBlock() local 417 LLVM_DEBUG(dbgs() << "LV: created " << NewBB->getName() << '\n'); in createEmptyBasicBlock() 435 auto *Br = BranchInst::Create(NewBB, PredBB); in createEmptyBasicBlock() 438 TermBr->setSuccessor(0, NewBB); in createEmptyBasicBlock() 445 TermBr->setSuccessor(idx, NewBB); in createEmptyBasicBlock() 447 CFG.DTU.applyUpdates({{DominatorTree::Insert, PredBB, NewBB}}); in createEmptyBasicBlock() 449 return NewBB; in createEmptyBasicBlock() 487 BasicBlock *NewBB = State->CFG.PrevBB; // Reuse it if possible. in execute() local 511 NewBB = createEmptyBasicBlock(State->CFG); in execute() 512 State->Builder.SetInsertPoint(NewBB); in execute() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
H A D | ARMConstantIslandPass.cpp | 254 void updateForInsertedWaterBlock(MachineBasicBlock *NewBB); 972 void ARMConstantIslands::updateForInsertedWaterBlock(MachineBasicBlock *NewBB) { in updateForInsertedWaterBlock() argument 974 NewBB->getParent()->RenumberBlocks(NewBB); in updateForInsertedWaterBlock() 978 BBUtils->insert(NewBB->getNumber(), BasicBlockInfo()); in updateForInsertedWaterBlock() 982 water_iterator IP = llvm::lower_bound(WaterList, NewBB, CompareMBBNumbers); in updateForInsertedWaterBlock() 983 WaterList.insert(IP, NewBB); in updateForInsertedWaterBlock() 1000 MachineBasicBlock *NewBB = in splitBlockBeforeInstr() local 1003 MF->insert(MBBI, NewBB); in splitBlockBeforeInstr() 1006 NewBB->splice(NewBB->end(), OrigBB, MI, OrigBB->end()); in splitBlockBeforeInstr() 1014 BuildMI(OrigBB, DebugLoc(), TII->get(Opc)).addMBB(NewBB); in splitBlockBeforeInstr() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Mips/ |
H A D | MipsConstantIslandPass.cpp | 387 void updateForInsertedWaterBlock(MachineBasicBlock *NewBB); 822 (MachineBasicBlock *NewBB) { in updateForInsertedWaterBlock() argument 824 NewBB->getParent()->RenumberBlocks(NewBB); in updateForInsertedWaterBlock() 828 BBInfo.insert(BBInfo.begin() + NewBB->getNumber(), BasicBlockInfo()); in updateForInsertedWaterBlock() 832 water_iterator IP = llvm::lower_bound(WaterList, NewBB, CompareMBBNumbers); in updateForInsertedWaterBlock() 833 WaterList.insert(IP, NewBB); in updateForInsertedWaterBlock() 848 MachineBasicBlock *NewBB = in splitBlockBeforeInstr() local 851 MF->insert(MBBI, NewBB); in splitBlockBeforeInstr() 854 NewBB->splice(NewBB->end(), OrigBB, MI, OrigBB->end()); in splitBlockBeforeInstr() 860 BuildMI(OrigBB, DebugLoc(), TII->get(Mips::Bimm16)).addMBB(NewBB); in splitBlockBeforeInstr() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | GenericDomTree.h | 677 void changeImmediateDominator(NodeT *BB, NodeT *NewBB) { 678 changeImmediateDominator(getNode(BB), getNode(NewBB)); 715 void splitBlock(NodeT *NewBB) { 717 Split<Inverse<NodeT *>>(NewBB); 719 Split<NodeT *>(NewBB); 848 void Split(typename GraphTraits<N>::NodeRef NewBB) { 851 assert(llvm::hasSingleElement(children<N>(NewBB)) && 853 NodeRef NewBBSucc = *GraphT::child_begin(NewBB); 855 SmallVector<NodeRef, 4> PredBlocks(inverse_children<N>(NewBB)); 861 if (Pred != NewBB && !dominates(NewBBSucc, Pred) && [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | LoopInfo.h | 475 auto *NewBB = NewLoc->getParent(); in movementPreservesLCSSAForm() local 479 if (OldBB == NewBB) in movementPreservesLCSSAForm() 483 auto *NewLoop = getLoopFor(NewBB); in movementPreservesLCSSAForm() 506 if (UBB != NewBB && getLoopFor(UBB) != NewLoop) in movementPreservesLCSSAForm() 528 if (DefBlock != NewBB && getLoopFor(DefBlock) != NewLoop) in movementPreservesLCSSAForm()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/ |
H A D | JumpThreading.h | 117 void updateSSA(BasicBlock *BB, BasicBlock *NewBB, 121 BasicBlock *NewBB, BasicBlock *PredBB); 172 BasicBlock *NewBB, BasicBlock *SuccBB,
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64PromoteConstant.cpp | 412 BasicBlock *NewBB = NewPt->getParent(); in tryAndMerge() local 421 if (NewBB == CurBB) { in tryAndMerge() 433 BasicBlock *CommonDominator = DT.findNearestCommonDominator(NewBB, CurBB); in tryAndMerge() 438 if (CommonDominator != NewBB) { in tryAndMerge()
|