diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h b/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h --- a/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -178,9 +178,10 @@ /// going to expand this expression. Sometimes this knowledge can lead to a /// more accurate cost estimation. bool isHighCostExpansion(const SCEV *Expr, Loop *L, + const TargetTransformInfo *TTI, const Instruction *At = nullptr) { SmallPtrSet Processed; - return isHighCostExpansionHelper(Expr, L, At, Processed); + return isHighCostExpansionHelper(Expr, L, At, TTI, Processed); } /// This method returns the canonical induction variable of the specified @@ -324,6 +325,7 @@ /// Recursive helper function for isHighCostExpansion. bool isHighCostExpansionHelper(const SCEV *S, Loop *L, const Instruction *At, + const TargetTransformInfo *TTI, SmallPtrSetImpl &Processed); /// Insert the specified binary operator, doing a small amount of work to diff --git a/llvm/include/llvm/Transforms/Utils/LoopUtils.h b/llvm/include/llvm/Transforms/Utils/LoopUtils.h --- a/llvm/include/llvm/Transforms/Utils/LoopUtils.h +++ b/llvm/include/llvm/Transforms/Utils/LoopUtils.h @@ -379,8 +379,9 @@ /// Return the number of loop exit values that have been replaced, and the /// corresponding phi node will be added to DeadInsts. int rewriteLoopExitValues(Loop *L, LoopInfo *LI, TargetLibraryInfo *TLI, - ScalarEvolution *SE, SCEVExpander &Rewriter, - DominatorTree *DT, ReplaceExitVal ReplaceExitValue, + ScalarEvolution *SE, const TargetTransformInfo *TTI, + SCEVExpander &Rewriter, DominatorTree *DT, + ReplaceExitVal ReplaceExitValue, SmallVector &DeadInsts); /// Set weights for \p UnrolledLoop and \p RemainderLoop based on weights for diff --git a/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h b/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h --- a/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h +++ b/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h @@ -26,6 +26,7 @@ class PHINode; class ScalarEvolution; class SCEVExpander; +class TargetTransformInfo; /// Interface for visiting interesting IV users that are recognized but not /// simplified by this utility. @@ -46,13 +47,15 @@ /// simplifyUsersOfIV - Simplify instructions that use this induction variable /// by using ScalarEvolution to analyze the IV's recurrence. bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT, - LoopInfo *LI, SmallVectorImpl &Dead, + LoopInfo *LI, const TargetTransformInfo *TTI, + SmallVectorImpl &Dead, SCEVExpander &Rewriter, IVVisitor *V = nullptr); /// SimplifyLoopIVs - Simplify users of induction variables within this /// loop. This does not actually change or add IVs. bool simplifyLoopIVs(Loop *L, ScalarEvolution *SE, DominatorTree *DT, - LoopInfo *LI, SmallVectorImpl &Dead); + LoopInfo *LI, const TargetTransformInfo *TTI, + SmallVectorImpl &Dead); } // end namespace llvm diff --git a/llvm/include/llvm/Transforms/Utils/UnrollLoop.h b/llvm/include/llvm/Transforms/Utils/UnrollLoop.h --- a/llvm/include/llvm/Transforms/Utils/UnrollLoop.h +++ b/llvm/include/llvm/Transforms/Utils/UnrollLoop.h @@ -80,16 +80,17 @@ LoopUnrollResult UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, - AssumptionCache *AC, OptimizationRemarkEmitter *ORE, - bool PreserveLCSSA, Loop **RemainderLoop = nullptr); + AssumptionCache *AC, + const llvm::TargetTransformInfo *TTI, + OptimizationRemarkEmitter *ORE, bool PreserveLCSSA, + Loop **RemainderLoop = nullptr); -bool UnrollRuntimeLoopRemainder(Loop *L, unsigned Count, - bool AllowExpensiveTripCount, - bool UseEpilogRemainder, bool UnrollRemainder, - bool ForgetAllSCEV, LoopInfo *LI, - ScalarEvolution *SE, DominatorTree *DT, - AssumptionCache *AC, bool PreserveLCSSA, - Loop **ResultLoop = nullptr); +bool UnrollRuntimeLoopRemainder( + Loop *L, unsigned Count, bool AllowExpensiveTripCount, + bool UseEpilogRemainder, bool UnrollRemainder, bool ForgetAllSCEV, + LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, + const TargetTransformInfo *TTI, bool PreserveLCSSA, + Loop **ResultLoop = nullptr); void computePeelCount(Loop *L, unsigned LoopSize, TargetTransformInfo::UnrollingPreferences &UP, @@ -104,6 +105,7 @@ unsigned TripMultiple, bool UnrollRemainder, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, + const TargetTransformInfo *TTI, OptimizationRemarkEmitter *ORE, Loop **EpilogueLoop = nullptr); @@ -121,7 +123,8 @@ void simplifyLoopAfterUnroll(Loop *L, bool SimplifyIVs, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, - AssumptionCache *AC); + AssumptionCache *AC, + const TargetTransformInfo *TTI); MDNode *GetUnrollMetadata(MDNode *LoopID, StringRef Name); diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp --- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp @@ -2130,8 +2130,7 @@ bool SCEVExpander::isHighCostExpansionHelper( const SCEV *S, Loop *L, const Instruction *At, - SmallPtrSetImpl &Processed) { - + const TargetTransformInfo *TTI, SmallPtrSetImpl &Processed) { // If we can find an existing value for this scev available at the point "At" // then consider the expression cheap. if (At && getRelatedExistingExpansion(S, At, L)) @@ -2143,14 +2142,14 @@ case scConstant: return false; case scTruncate: - return isHighCostExpansionHelper(cast(S)->getOperand(), - L, At, Processed); + return isHighCostExpansionHelper(cast(S)->getOperand(), L, + At, TTI, Processed); case scZeroExtend: return isHighCostExpansionHelper(cast(S)->getOperand(), - L, At, Processed); + L, At, TTI, Processed); case scSignExtend: return isHighCostExpansionHelper(cast(S)->getOperand(), - L, At, Processed); + L, At, TTI, Processed); } if (!Processed.insert(S).second) @@ -2163,7 +2162,8 @@ // lowered into a right shift. if (auto *SC = dyn_cast(UDivExpr->getRHS())) if (SC->getAPInt().isPowerOf2()) { - if (isHighCostExpansionHelper(UDivExpr->getLHS(), L, At, Processed)) + if (isHighCostExpansionHelper(UDivExpr->getLHS(), L, At, TTI, + Processed)) return true; const DataLayout &DL = L->getHeader()->getParent()->getParent()->getDataLayout(); @@ -2200,7 +2200,7 @@ // they are not too expensive rematerialize. if (const SCEVNAryExpr *NAry = dyn_cast(S)) { for (auto *Op : NAry->operands()) - if (isHighCostExpansionHelper(Op, L, At, Processed)) + if (isHighCostExpansionHelper(Op, L, At, TTI, Processed)) return true; } diff --git a/llvm/lib/Target/ARM/MVETailPredication.cpp b/llvm/lib/Target/ARM/MVETailPredication.cpp --- a/llvm/lib/Target/ARM/MVETailPredication.cpp +++ b/llvm/lib/Target/ARM/MVETailPredication.cpp @@ -158,7 +158,7 @@ ReplaceExitVal ReplaceExitValue = AlwaysRepl; formLCSSARecursively(*L, *DT, LI, SE); - rewriteLoopExitValues(L, LI, TLI, SE, Rewriter, DT, ReplaceExitValue, + rewriteLoopExitValues(L, LI, TLI, SE, TTI, Rewriter, DT, ReplaceExitValue, DeadInsts); } diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -1657,8 +1657,8 @@ // Information about sign/zero extensions of CurrIV. IndVarSimplifyVisitor Visitor(CurrIV, SE, TTI, DT); - Changed |= - simplifyUsersOfIV(CurrIV, SE, DT, LI, DeadInsts, Rewriter, &Visitor); + Changed |= simplifyUsersOfIV(CurrIV, SE, DT, LI, TTI, DeadInsts, Rewriter, + &Visitor); if (Visitor.WI.WidestNativeType) { WideIVs.push_back(Visitor.WI); @@ -2691,7 +2691,7 @@ // loop into any instructions outside of the loop that use the final values // of the current expressions. if (ReplaceExitValue != NeverRepl) { - if (int Rewrites = rewriteLoopExitValues(L, LI, TLI, SE, Rewriter, DT, + if (int Rewrites = rewriteLoopExitValues(L, LI, TLI, SE, TTI, Rewriter, DT, ReplaceExitValue, DeadInsts)) { NumReplaced += Rewrites; Changed = true; @@ -2752,7 +2752,7 @@ // Avoid high cost expansions. Note: This heuristic is questionable in // that our definition of "high cost" is not exactly principled. - if (Rewriter.isHighCostExpansion(ExitCount, L)) + if (Rewriter.isHighCostExpansion(ExitCount, L, TTI)) continue; // Check preconditions for proper SCEVExpander operation. SCEV does not diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp --- a/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp @@ -388,7 +388,7 @@ Loop *EpilogueOuterLoop = nullptr; LoopUnrollResult UnrollResult = UnrollAndJamLoop( L, UP.Count, OuterTripCount, OuterTripMultiple, UP.UnrollRemainder, LI, - &SE, &DT, &AC, &ORE, &EpilogueOuterLoop); + &SE, &DT, &AC, &TTI, &ORE, &EpilogueOuterLoop); // Assign new loop attributes. if (EpilogueOuterLoop) { diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp --- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -1148,7 +1148,7 @@ {UP.Count, TripCount, UP.Force, UP.Runtime, UP.AllowExpensiveTripCount, UseUpperBound, MaxOrZero, TripMultiple, UP.PeelCount, UP.UnrollRemainder, ForgetAllSCEV}, - LI, &SE, &DT, &AC, &ORE, PreserveLCSSA, &RemainderLoop); + LI, &SE, &DT, &AC, &TTI, &ORE, PreserveLCSSA, &RemainderLoop); if (UnrollResult == LoopUnrollResult::Unmodified) return LoopUnrollResult::Unmodified; diff --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp --- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp @@ -166,11 +166,12 @@ /// simplify/dce pass of the instructions. void llvm::simplifyLoopAfterUnroll(Loop *L, bool SimplifyIVs, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, - AssumptionCache *AC) { + AssumptionCache *AC, + const TargetTransformInfo *TTI) { // Simplify any new induction variables in the partially unrolled loop. if (SE && SimplifyIVs) { SmallVector DeadInsts; - simplifyLoopIVs(L, SE, DT, LI, DeadInsts); + simplifyLoopIVs(L, SE, DT, LI, TTI, DeadInsts); // Aggressively clean up dead instructions that simplifyLoopIVs already // identified. Any remaining should be cleaned up below. @@ -245,6 +246,7 @@ LoopUnrollResult llvm::UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, + const TargetTransformInfo *TTI, OptimizationRemarkEmitter *ORE, bool PreserveLCSSA, Loop **RemainderLoop) { @@ -403,7 +405,7 @@ if (RuntimeTripCount && ULO.TripMultiple % ULO.Count != 0 && !UnrollRuntimeLoopRemainder(L, ULO.Count, ULO.AllowExpensiveTripCount, EpilogProfitability, ULO.UnrollRemainder, - ULO.ForgetAllSCEV, LI, SE, DT, AC, + ULO.ForgetAllSCEV, LI, SE, DT, AC, TTI, PreserveLCSSA, RemainderLoop)) { if (ULO.Force) RuntimeTripCount = false; @@ -865,7 +867,7 @@ // At this point, the code is well formed. We now simplify the unrolled loop, // doing constant propagation and dead code elimination as we go. simplifyLoopAfterUnroll(L, !CompletelyUnroll && (ULO.Count > 1 || Peeled), LI, - SE, DT, AC); + SE, DT, AC, TTI); NumCompletelyUnrolled += CompletelyUnroll; ++NumUnrolled; diff --git a/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp b/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp --- a/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp @@ -169,10 +169,12 @@ If EpilogueLoop is non-null, it receives the epilogue loop (if it was necessary to create one and not fully unrolled). */ -LoopUnrollResult llvm::UnrollAndJamLoop( - Loop *L, unsigned Count, unsigned TripCount, unsigned TripMultiple, - bool UnrollRemainder, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, - AssumptionCache *AC, OptimizationRemarkEmitter *ORE, Loop **EpilogueLoop) { +LoopUnrollResult +llvm::UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount, + unsigned TripMultiple, bool UnrollRemainder, + LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, + AssumptionCache *AC, const TargetTransformInfo *TTI, + OptimizationRemarkEmitter *ORE, Loop **EpilogueLoop) { // When we enter here we should have already checked that it is safe BasicBlock *Header = L->getHeader(); @@ -198,7 +200,7 @@ if (!UnrollRuntimeLoopRemainder(L, Count, /*AllowExpensiveTripCount*/ false, /*UseEpilogRemainder*/ true, UnrollRemainder, /*ForgetAllSCEV*/ false, - LI, SE, DT, AC, true, EpilogueLoop)) { + LI, SE, DT, AC, TTI, true, EpilogueLoop)) { LLVM_DEBUG(dbgs() << "Won't unroll-and-jam; remainder loop could not be " "generated when assuming runtime trip count\n"); return LoopUnrollResult::Unmodified; @@ -563,8 +565,9 @@ // At this point, the code is well formed. We now do a quick sweep over the // inserted code, doing constant propagation and dead code elimination as we // go. - simplifyLoopAfterUnroll(SubLoop, true, LI, SE, DT, AC); - simplifyLoopAfterUnroll(L, !CompletelyUnroll && Count > 1, LI, SE, DT, AC); + simplifyLoopAfterUnroll(SubLoop, true, LI, SE, DT, AC, TTI); + simplifyLoopAfterUnroll(L, !CompletelyUnroll && Count > 1, LI, SE, DT, AC, + TTI); NumCompletelyUnrolledAndJammed += CompletelyUnroll; ++NumUnrolledAndJammed; diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -543,13 +543,11 @@ /// if (extraiters != 0) jump Epil: // Omitted if unroll factor is 2. /// EpilExit: -bool llvm::UnrollRuntimeLoopRemainder(Loop *L, unsigned Count, - bool AllowExpensiveTripCount, - bool UseEpilogRemainder, - bool UnrollRemainder, bool ForgetAllSCEV, - LoopInfo *LI, ScalarEvolution *SE, - DominatorTree *DT, AssumptionCache *AC, - bool PreserveLCSSA, Loop **ResultLoop) { +bool llvm::UnrollRuntimeLoopRemainder( + Loop *L, unsigned Count, bool AllowExpensiveTripCount, + bool UseEpilogRemainder, bool UnrollRemainder, bool ForgetAllSCEV, + LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, + const TargetTransformInfo *TTI, bool PreserveLCSSA, Loop **ResultLoop) { LLVM_DEBUG(dbgs() << "Trying runtime unrolling on Loop: \n"); LLVM_DEBUG(L->dump()); LLVM_DEBUG(UseEpilogRemainder ? dbgs() << "Using epilog remainder.\n" @@ -637,7 +635,7 @@ const DataLayout &DL = Header->getModule()->getDataLayout(); SCEVExpander Expander(*SE, DL, "loop-unroll"); if (!AllowExpensiveTripCount && - Expander.isHighCostExpansion(TripCountSC, L, PreHeaderBR)) { + Expander.isHighCostExpansion(TripCountSC, L, TTI, PreHeaderBR)) { LLVM_DEBUG(dbgs() << "High cost for expanding trip count scev!\n"); return false; } @@ -949,7 +947,7 @@ /*AllowExpensiveTripCount*/ false, /*PreserveCondBr*/ true, /*PreserveOnlyFirst*/ false, /*TripMultiple*/ 1, /*PeelCount*/ 0, /*UnrollRemainder*/ false, ForgetAllSCEV}, - LI, SE, DT, AC, /*ORE*/ nullptr, PreserveLCSSA); + LI, SE, DT, AC, TTI, /*ORE*/ nullptr, PreserveLCSSA); } if (ResultLoop && UnrollResult != LoopUnrollResult::FullyUnrolled) diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -1262,10 +1262,12 @@ return true; } -int llvm::rewriteLoopExitValues(Loop *L, LoopInfo *LI, - TargetLibraryInfo *TLI, ScalarEvolution *SE, SCEVExpander &Rewriter, - DominatorTree *DT, ReplaceExitVal ReplaceExitValue, - SmallVector &DeadInsts) { +int llvm::rewriteLoopExitValues(Loop *L, LoopInfo *LI, TargetLibraryInfo *TLI, + ScalarEvolution *SE, + const TargetTransformInfo *TTI, + SCEVExpander &Rewriter, DominatorTree *DT, + ReplaceExitVal ReplaceExitValue, + SmallVector &DeadInsts) { // Check a pre-condition. assert(L->isRecursivelyLCSSAForm(*DT, *LI) && "Indvars did not preserve LCSSA!"); @@ -1354,7 +1356,7 @@ hasHardUserWithinLoop(L, Inst)) continue; - bool HighCost = Rewriter.isHighCostExpansion(ExitValue, L, Inst); + bool HighCost = Rewriter.isHighCostExpansion(ExitValue, L, TTI, Inst); Value *ExitVal = Rewriter.expandCodeFor(ExitValue, PN->getType(), Inst); LLVM_DEBUG(dbgs() << "rewriteLoopExitValues: AfterLoopVal = " diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp --- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp @@ -54,6 +54,7 @@ LoopInfo *LI; ScalarEvolution *SE; DominatorTree *DT; + const TargetTransformInfo *TTI; SCEVExpander &Rewriter; SmallVectorImpl &DeadInsts; @@ -61,10 +62,11 @@ public: SimplifyIndvar(Loop *Loop, ScalarEvolution *SE, DominatorTree *DT, - LoopInfo *LI, SCEVExpander &Rewriter, + LoopInfo *LI, const TargetTransformInfo *TTI, + SCEVExpander &Rewriter, SmallVectorImpl &Dead) - : L(Loop), LI(LI), SE(SE), DT(DT), Rewriter(Rewriter), DeadInsts(Dead), - Changed(false) { + : L(Loop), LI(LI), SE(SE), DT(DT), TTI(TTI), Rewriter(Rewriter), + DeadInsts(Dead), Changed(false) { assert(LI && "IV simplification requires LoopInfo"); } @@ -667,7 +669,7 @@ return false; // Do not generate something ridiculous even if S is loop invariant. - if (Rewriter.isHighCostExpansion(S, L, I)) + if (Rewriter.isHighCostExpansion(S, L, TTI, I)) return false; auto *IP = GetLoopInvariantInsertPosition(L, I); @@ -931,10 +933,11 @@ /// Simplify instructions that use this induction variable /// by using ScalarEvolution to analyze the IV's recurrence. bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT, - LoopInfo *LI, SmallVectorImpl &Dead, + LoopInfo *LI, const TargetTransformInfo *TTI, + SmallVectorImpl &Dead, SCEVExpander &Rewriter, IVVisitor *V) { - SimplifyIndvar SIV(LI->getLoopFor(CurrIV->getParent()), SE, DT, LI, Rewriter, - Dead); + SimplifyIndvar SIV(LI->getLoopFor(CurrIV->getParent()), SE, DT, LI, TTI, + Rewriter, Dead); SIV.simplifyUsers(CurrIV, V); return SIV.hasChanged(); } @@ -942,14 +945,16 @@ /// Simplify users of induction variables within this /// loop. This does not actually change or add IVs. bool simplifyLoopIVs(Loop *L, ScalarEvolution *SE, DominatorTree *DT, - LoopInfo *LI, SmallVectorImpl &Dead) { + LoopInfo *LI, const TargetTransformInfo *TTI, + SmallVectorImpl &Dead) { SCEVExpander Rewriter(*SE, SE->getDataLayout(), "indvars"); #ifndef NDEBUG Rewriter.setDebugType(DEBUG_TYPE); #endif bool Changed = false; for (BasicBlock::iterator I = L->getHeader()->begin(); isa(I); ++I) { - Changed |= simplifyUsersOfIV(cast(I), SE, DT, LI, Dead, Rewriter); + Changed |= + simplifyUsersOfIV(cast(I), SE, DT, LI, TTI, Dead, Rewriter); } return Changed; } diff --git a/llvm/unittests/Transforms/Utils/UnrollLoopTest.cpp b/llvm/unittests/Transforms/Utils/UnrollLoopTest.cpp --- a/llvm/unittests/Transforms/Utils/UnrollLoopTest.cpp +++ b/llvm/unittests/Transforms/Utils/UnrollLoopTest.cpp @@ -70,7 +70,8 @@ bool PreserveLCSSA = L->isRecursivelyLCSSAForm(DT,LI); - bool ret = UnrollRuntimeLoopRemainder(L, 4, true, false, false, false, &LI, - &SE, &DT, &AC, PreserveLCSSA); + bool ret = + UnrollRuntimeLoopRemainder(L, 4, true, false, false, false, &LI, &SE, &DT, + &AC, /*TTI=*/nullptr, PreserveLCSSA); EXPECT_FALSE(ret); }