Lines Matching full:prefetch
34 #define DEBUG_TYPE "loop-data-prefetch"
41 PrefetchWrites("loop-prefetch-writes", cl::Hidden, cl::init(false),
42 cl::desc("Prefetch write addresses"));
45 PrefetchDistance("prefetch-distance",
46 cl::desc("Number of instructions to prefetch ahead"),
50 MinPrefetchStride("min-prefetch-stride",
54 "max-prefetch-iters-ahead",
55 cl::desc("Max number of iterations to prefetch ahead"), cl::Hidden);
61 /// Loop prefetch implementation class.
75 /// warrant a prefetch.
141 INITIALIZE_PASS_BEGIN(LoopDataPrefetchLegacyPass, "loop-data-prefetch",
142 "Loop Data Prefetch", false, false)
149 INITIALIZE_PASS_END(LoopDataPrefetchLegacyPass, "loop-data-prefetch", in INITIALIZE_PASS_DEPENDENCY()
150 "Loop Data Prefetch", false, false) in INITIALIZE_PASS_DEPENDENCY()
163 // If MinStride is set, don't prefetch unless we can ensure that stride is in isStrideLargeEnough()
219 "for loop data prefetch.\n"); in run()
232 /// A record for a potential prefetch made during the initial scan of the
233 /// loop. This is used to let a single prefetch target multiple memory accesses.
234 struct Prefetch { struct
235 /// The address formula for this prefetch as returned by ScalarEvolution.
237 /// The point of insertion for the prefetch instruction.
244 /// Constructor to create a new Prefetch for \p I. argument
245 Prefetch(const SCEVAddRecExpr *L, Instruction *I) : LSCEVAddRec(L) { in Prefetch() function
249 /// Add the instruction \param I to this prefetch. If it's not the first
277 // Only prefetch in the inner-most loop in runOnLoop()
284 // Calculate the number of iterations ahead to prefetch in runOnLoop()
293 if (F->getIntrinsicID() == Intrinsic::prefetch) in runOnLoop()
325 SmallVector<Prefetch, 16> Prefetches; in runOnLoop()
353 // We don't want to double prefetch individual cache lines. If this in runOnLoop()
355 // has already been prefetched, then don't prefetch this one as well. in runOnLoop()
370 Prefetches.push_back(Prefetch(LSCEVAddRec, MemI)); in runOnLoop()
383 << Prefetches.size() << " potential prefetch(es), " in runOnLoop()
389 // prefetch. in runOnLoop()
409 M, Intrinsic::prefetch, PrefPtrValue->getType()); in runOnLoop()