[all-commits] [llvm/llvm-project] 0562cf: Allow data prefetch into non-default address space

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Wed Jul 27 10:24:37 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0562cf442f128e2665ecddc68ca9511a6a4a479b
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2022-07-27 (Wed, 27 Jul 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/include/llvm/MC/MCSubtargetInfo.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/MC/MCSubtargetInfo.cpp
    M llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp

  Log Message:
  Allow data prefetch into non-default address space

I am playing with the LoopDataPrefetch pass and found out that it
bails to work with a pointer in a non-zero address space. This
patch adds the target callback to check if an address space is to
be considered for prefetching. Default implementation still only
allows address space 0, so this is NFCI.

This does not currently affect any known targets, but seems to be
generally useful for the future.

Differential Revision: https://reviews.llvm.org/D129795

More information about the All-commits mailing list