[llvm-commits] [PATCH/RFC] Loop Data Software Prefetching

Nadav Rotem nrotem at apple.com
Tue Jan 29 14:58:45 PST 2013


 
+// Loop data prefetching.
+static cl::opt<unsigned>
+L1CacheLineSize("l1-cache-line-size", cl::init(64), cl::Hidden,
+  cl::desc("The size of the an L1 cache line"));
+
+static cl::opt<bool>
+LoopDataPref("prefetch-loop-data", cl::init(false), cl::Hidden,
+  cl::desc("Prefetch loop data"));
+
+static cl::opt<unsigned>
+LoopDataPrefDist("loop-data-prefetch-distance", cl::init(300), cl::Hidden,
+  cl::desc("Loop data prefetch code-metric distance"));
+
+static cl::opt<bool>
+PrefetchWrites("loop-data-prefetch-writes", cl::init(false), cl::Hidden,
+  cl::desc("Prefetch writes in loops"));
+

Hi Hal, 

I don't think that adding command line flags to TTI is the right way to go. After chandler's refactoring to TTI you can now chain multiple TTI analysis one after the other. You can implement your own TTI that will override the default TTI. Much like X86 overrides the basic TTI which overrides NoTTI.  


On Jan 29, 2013, at 12:39 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> <loopdatapref.patch>




More information about the llvm-commits mailing list