Lines Matching refs:DT

166 static void hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
170 static bool sink(Instruction &I, LoopInfo *LI, DominatorTree *DT,
174 Instruction &Inst, const DominatorTree *DT, const TargetLibraryInfo *TLI,
188 DominatorTree *DT);
209 bool runOnLoop(Loop *L, AAResults *AA, LoopInfo *LI, DominatorTree *DT,
298 if (!LICM.runOnLoop(&L, &AR.AA, &AR.LI, &AR.DT, &AR.AC, &AR.TLI, &AR.TTI, in run()
334 bool Changed = LICM.runOnLoop(&OutermostLoop, &AR.AA, &AR.LI, &AR.DT, &AR.AC, in run()
400 DominatorTree *DT, AssumptionCache *AC, in runOnLoop() argument
408 assert(L->isLCSSAForm(*DT) && "Loop is not in LCSSA form."); in runOnLoop()
455 ? sinkRegionForLoopNest(DT->getNode(L->getHeader()), AA, LI, DT, in runOnLoop()
457 : sinkRegion(DT->getNode(L->getHeader()), AA, LI, DT, TLI, TTI, L, in runOnLoop()
461 Changed |= hoistRegion(DT->getNode(L->getHeader()), AA, LI, DT, AC, TLI, L, in runOnLoop()
505 DT, AC, TLI, TTI, L, MSSAU, &SafetyInfo, ORE, in runOnLoop()
518 formLCSSARecursively(*L, *DT, LI, SE); in runOnLoop()
527 assert(L->isLCSSAForm(*DT) && "Loop not left in LCSSA form after LICM!"); in runOnLoop()
528 assert((L->isOutermost() || L->getParentLoop()->isLCSSAForm(*DT)) && in runOnLoop()
545 DominatorTree *DT, TargetLibraryInfo *TLI, in sinkRegion() argument
552 assert(N != nullptr && AA != nullptr && LI != nullptr && DT != nullptr && in sinkRegion()
595 canSinkOrHoistInst(I, AA, DT, CurLoop, MSSAU, true, Flags, ORE)) { in sinkRegion()
596 if (sink(I, LI, DT, CurLoop, SafetyInfo, MSSAU, ORE)) { in sinkRegion()
613 DominatorTree *DT, TargetLibraryInfo *TLI, in sinkRegionForLoopNest() argument
626 Changed |= sinkRegion(DT->getNode(L->getHeader()), AA, LI, DT, TLI, TTI, L, in sinkRegionForLoopNest()
644 DominatorTree *DT; member in __anon7e16e74e0511::ControlFlowHoister
657 ControlFlowHoister(LoopInfo *LI, DominatorTree *DT, Loop *CurLoop, in ControlFlowHoister() argument
659 : LI(LI), DT(DT), CurLoop(CurLoop), MSSAU(MSSAU) {} in ControlFlowHoister()
713 if (CommonSucc && DT->dominates(BI, CommonSucc)) in registerPossiblyHoistableBranch()
798 DT->addNewBlock(New, HoistTarget); in getOrCreateHoistedBlock()
837 DomTreeNode *PreheaderNode = DT->getNode(HoistCommonSucc); in getOrCreateHoistedBlock()
838 DomTreeNode *HeaderNode = DT->getNode(CurLoop->getHeader()); in getOrCreateHoistedBlock()
839 DT->changeImmediateDominator(HeaderNode, PreheaderNode); in getOrCreateHoistedBlock()
866 DominatorTree *DT, AssumptionCache *AC, in hoistRegion() argument
874 assert(N != nullptr && AA != nullptr && LI != nullptr && DT != nullptr && in hoistRegion()
878 ControlFlowHoister CFH(LI, DT, CurLoop, MSSAU); in hoistRegion()
906 canSinkOrHoistInst(I, AA, DT, CurLoop, MSSAU, true, Flags, ORE) && in hoistRegion()
908 I, DT, TLI, CurLoop, SafetyInfo, ORE, in hoistRegion()
910 hoist(I, DT, CurLoop, CFH.getOrCreateHoistedBlock(BB), SafetyInfo, in hoistRegion()
936 hoist(*ReciprocalDivisor, DT, CurLoop, CFH.getOrCreateHoistedBlock(BB), in hoistRegion()
949 return SafetyInfo->isGuaranteedToExecute(I, DT, CurLoop) && in hoistRegion()
955 hoist(I, DT, CurLoop, CFH.getOrCreateHoistedBlock(BB), SafetyInfo, in hoistRegion()
969 hoist(*PN, DT, CurLoop, CFH.getOrCreateHoistedBlock(BB), SafetyInfo, in hoistRegion()
971 assert(DT->dominates(PN, BB) && "Conditional PHIs not expected"); in hoistRegion()
979 if (hoistArithmetics(I, *CurLoop, *SafetyInfo, MSSAU, AC, DT)) { in hoistRegion()
1002 [&](Use &U) { return DT->dominates(I, U); })) { in hoistRegion()
1004 DT->getNode(I->getParent())->getIDom()->getBlock(); in hoistRegion()
1005 if (!HoistPoint || !DT->dominates(HoistPoint->getParent(), Dominator)) { in hoistRegion()
1007 assert(DT->dominates(Dominator, HoistPoint->getParent()) && in hoistRegion()
1028 assert(DT->verify(DominatorTree::VerificationLevel::Fast) && in hoistRegion()
1030 LI->verify(*DT); in hoistRegion()
1041 static bool isLoadInvariantInLoop(LoadInst *LI, DominatorTree *DT, in isLoadInvariantInLoop() argument
1088 DT->properlyDominates(II->getParent(), CurLoop->getHeader())) in isLoadInvariantInLoop()
1149 bool llvm::canSinkOrHoistInst(Instruction &I, AAResults *AA, DominatorTree *DT, in canSinkOrHoistInst() argument
1175 if (isLoadInvariantInLoop(LI, DT, CurLoop)) in canSinkOrHoistInst()
1545 static void splitPredecessorsOfLoopExit(PHINode *PN, DominatorTree *DT, in splitPredecessorsOfLoopExit() argument
1598 ExitBB, PredBB, ".split.loop.exit", DT, LI, MSSAU, true); in splitPredecessorsOfLoopExit()
1617 static bool sink(Instruction &I, LoopInfo *LI, DominatorTree *DT, in sink() argument
1634 if (!DT->isReachableFromEntry(User->getParent())) { in sink()
1647 if (!DT->isReachableFromEntry(BB)) { in sink()
1662 splitPredecessorsOfLoopExit(PN, DT, LI, CurLoop, SafetyInfo, &MSSAU); in sink()
1724 static void hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop, in hoist() argument
1747 !SafetyInfo->isGuaranteedToExecute(I, DT, CurLoop)) in hoist()
1771 Instruction &Inst, const DominatorTree *DT, const TargetLibraryInfo *TLI, in isSafeToExecuteUnconditionally() argument
1776 isSafeToSpeculativelyExecute(&Inst, CtxI, AC, DT, TLI)) in isSafeToExecuteUnconditionally()
1780 SafetyInfo->isGuaranteedToExecute(Inst, DT, CurLoop); in isSafeToExecuteUnconditionally()
1914 DominatorTree *DT) { in isNotCapturedBeforeOrInLoop() argument
1921 L->getHeader()->getTerminator(), DT); in isNotCapturedBeforeOrInLoop()
1927 DominatorTree *DT) { in isNotVisibleOnUnwindInLoop() argument
1933 isNotCapturedBeforeOrInLoop(Object, L, DT); in isNotVisibleOnUnwindInLoop()
1936 bool isThreadLocalObject(const Value *Object, const Loop *L, DominatorTree *DT, in isThreadLocalObject() argument
1941 isNotCapturedBeforeOrInLoop(Object, L, DT)) || in isThreadLocalObject()
1957 LoopInfo *LI, DominatorTree *DT, AssumptionCache *AC, in promoteLoopAccessesToScalars() argument
1963 assert(LI != nullptr && DT != nullptr && CurLoop != nullptr && in promoteLoopAccessesToScalars()
2048 if (!isNotVisibleOnUnwindInLoop(Object, CurLoop, DT)) in promoteLoopAccessesToScalars()
2081 *Load, DT, TLI, CurLoop, SafetyInfo, ORE, in promoteLoopAccessesToScalars()
2104 SafetyInfo->isGuaranteedToExecute(*UI, DT, CurLoop); in promoteLoopAccessesToScalars()
2121 return DT->dominates(Store->getParent(), Exit); in promoteLoopAccessesToScalars()
2130 Store->getAlign(), MDL, Preheader->getTerminator(), AC, DT, TLI); in promoteLoopAccessesToScalars()
2181 isThreadLocalObject(Object, CurLoop, DT, TTI)) in promoteLoopAccessesToScalars()
2473 DominatorTree *DT) { in hoistGEP() argument
2499 return isKnownNonNegative(V, SimplifyQuery(DL, DT, AC, GEP)); in hoistGEP()
2525 AssumptionCache *AC, DominatorTree *DT) { in hoistAdd() argument
2550 SimplifyQuery(DL, DT, AC, &ICmp)) == in hoistAdd()
2572 AssumptionCache *AC, DominatorTree *DT) { in hoistSub() argument
2601 SimplifyQuery SQ(DL, DT, AC, &ICmp); in hoistSub()
2632 DominatorTree *DT) { in hoistAddSub() argument
2655 if (hoistAdd(Pred, LHS, RHS, cast<ICmpInst>(I), L, SafetyInfo, MSSAU, AC, DT)) in hoistAddSub()
2658 if (hoistSub(Pred, LHS, RHS, cast<ICmpInst>(I), L, SafetyInfo, MSSAU, AC, DT)) in hoistAddSub()
2672 DominatorTree *DT) { in hoistFPAssociation() argument
2733 DominatorTree *DT) { in hoistArithmetics() argument
2744 if (hoistGEP(I, L, SafetyInfo, MSSAU, AC, DT)) { in hoistArithmetics()
2751 if (hoistAddSub(I, L, SafetyInfo, MSSAU, AC, DT)) { in hoistArithmetics()
2757 if (hoistFPAssociation(I, L, SafetyInfo, MSSAU, AC, DT)) { in hoistArithmetics()