[PATCH] D24833: [LoopDataPrefetch/AArch64] Allow selective prefetching of symbolic strided accesses

Balaram Makam via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 09:50:43 PDT 2016


bmakam created this revision.
bmakam added reviewers: anemet, mcrosier.
bmakam added a subscriber: llvm-commits.
Herald added subscribers: mzolotukhin, mcrosier, rengolin, aemerson.

    Irregular streams typically consist of array accesses in which a subscripted variable
    appears in one of the subscript positions, such as: A[B[i]].

    For example:
      for (unsigned i = 0; i < 100; i++)
        A[i + 1] = A[Stride * i] + B[i];

    This software prefetching scheme looks for such symbolic strides "a[i*stride]" and prefetches
    'PrefetchDegree' cache lines ahead of the visiting load address. Add a TTI interface
    'getPrefetchDegree' to query the target parameter.

    This is currently enabled for Kryo only. A target would have to provide this information
    to opt in to prefetch 'PrefetchDegree' cache lines ahead.

    This improves performance of several Spec200x benchmarks on Kryo:

    Benchmark                  Diff (%)
    -----------------------    ----------
    spec2006/h264ref:ref       -1.282%
    spec2006/povray:ref        +1.133%
    spec2006/gcc:ref           +1.617%
    spec2006/mcf:ref           +6.544%
    spec2000/mesa:ref          +3.228%
    spec2000/gcc:ref           +6.648%
    spec2000/gap:ref           +16.098%


https://reviews.llvm.org/D24833

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Target/AArch64/AArch64Subtarget.cpp
  lib/Target/AArch64/AArch64Subtarget.h
  lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  lib/Target/AArch64/AArch64TargetTransformInfo.h
  lib/Transforms/Scalar/LoopDataPrefetch.cpp
  test/Transforms/LoopDataPrefetch/AArch64/kryo-large-stride.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24833.72187.patch
Type: text/x-patch
Size: 13633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160922/465fc76b/attachment.bin>


More information about the llvm-commits mailing list