[PATCH] D129795: Allow data prefetch into non-default address space

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 12:26:04 PDT 2022


rampitec created this revision.
rampitec added reviewers: jonpa, foad.
Herald added a subscriber: hiraditya.
Herald added a project: All.
rampitec requested review of this revision.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D129795

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129795.444763.patch
Type: text/x-patch
Size: 4982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220714/113e7e86/attachment.bin>


More information about the llvm-commits mailing list