@@ -1848,7 +1848,6 @@ class GeneratedRTChecks {
18481848
18491849 DominatorTree *DT;
18501850 LoopInfo *LI;
1851- TargetTransformInfo *TTI;
18521851
18531852 SCEVExpander SCEVExp;
18541853 SCEVExpander MemCheckExp;
@@ -1864,9 +1863,9 @@ class GeneratedRTChecks {
18641863
18651864public:
18661865 GeneratedRTChecks (PredicatedScalarEvolution &PSE, DominatorTree *DT,
1867- LoopInfo *LI, TargetTransformInfo *TTI ,
1868- const DataLayout &DL, LoopVectorizationCostModel &CM)
1869- : DT(DT), LI(LI), TTI(TTI),
1866+ LoopInfo *LI, const DataLayout &DL ,
1867+ LoopVectorizationCostModel &CM)
1868+ : DT(DT), LI(LI),
18701869 SCEVExp (*PSE.getSE(), DL, "scev.check", /* PreserveLCSSA=*/ false),
18711870 MemCheckExp(*PSE.getSE(), DL, "scev.check", /* PreserveLCSSA=*/ false),
18721871 PSE(PSE), CM(CM) {}
@@ -2000,7 +1999,7 @@ class GeneratedRTChecks {
20001999 for (Instruction &I : *SCEVCheckBlock) {
20012000 if (SCEVCheckBlock->getTerminator () == &I)
20022001 continue ;
2003- InstructionCost C = TTI-> getInstructionCost (&I, CM.CostKind );
2002+ InstructionCost C = CM. TTI . getInstructionCost (&I, CM.CostKind );
20042003 LLVM_DEBUG (dbgs () << " " << C << " for " << I << " \n " );
20052004 RTCheckCost += C;
20062005 }
@@ -2009,7 +2008,7 @@ class GeneratedRTChecks {
20092008 for (Instruction &I : *MemCheckBlock) {
20102009 if (MemCheckBlock->getTerminator () == &I)
20112010 continue ;
2012- InstructionCost C = TTI-> getInstructionCost (&I, CM.CostKind );
2011+ InstructionCost C = CM. TTI . getInstructionCost (&I, CM.CostKind );
20132012 LLVM_DEBUG (dbgs () << " " << C << " for " << I << " \n " );
20142013 MemCheckCost += C;
20152014 }
@@ -9257,7 +9256,7 @@ static bool processLoopInVPlanNativePath(
92579256 VPlan &BestPlan = LVP.getPlanFor (VF.Width );
92589257
92599258 {
9260- GeneratedRTChecks Checks (PSE, DT, LI, TTI, F->getDataLayout (), CM);
9259+ GeneratedRTChecks Checks (PSE, DT, LI, F->getDataLayout (), CM);
92619260 InnerLoopVectorizer LB (L, PSE, LI, DT, TTI, AC, VF.Width , /* UF=*/ 1 , &CM,
92629261 Checks, BestPlan);
92639262 LLVM_DEBUG (dbgs () << " Vectorizing outer loop in \" "
@@ -10093,7 +10092,7 @@ bool LoopVectorizePass::processLoop(Loop *L) {
1009310092 if (ORE->allowExtraAnalysis (LV_NAME))
1009410093 LVP.emitInvalidCostRemarks (ORE);
1009510094
10096- GeneratedRTChecks Checks (PSE, DT, LI, TTI, F->getDataLayout (), CM);
10095+ GeneratedRTChecks Checks (PSE, DT, LI, F->getDataLayout (), CM);
1009710096 if (LVP.hasPlanWithVF (VF.Width )) {
1009810097 // Select the interleave count.
1009910098 IC = LVP.selectInterleaveCount (LVP.getPlanFor (VF.Width ), VF.Width , VF.Cost );
0 commit comments