[llvm] Add AMDGPU metadata to copyMetadataForLoad() (PR #110720)
Krzysztof Drewniak via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 11:41:45 PDT 2024
================
@@ -3488,6 +3490,14 @@ void llvm::copyMetadataForLoad(LoadInst &Dest, const LoadInst &Source) {
copyRangeMetadata(DL, Source, N, Dest);
break;
}
+ // Extended last-use / nontemporal hint on AMD GPUs
+ if (ID == Ctx.getMDKindID("amdpu.last.use"))
+ Dest.setMetadata(ID, N);
+ // Currently only relevant to atomics
+ else if (ID == Ctx.getMDKindID("amdgpu.no.remote.memory"))
+ Dest.setMetadata(ID, N);
+ else if (ID == Ctx.getMDKindID("amdgpu.no.fine.grained.memory"))
+ Dest.setMetadata(ID, N);
----------------
krzysz00 wrote:
So, while they're currently only related to `atomicrmw`s, I can imagine some hypothetical future where an atomic load or the like needs a `!amdgpu.no.host.memory` to avoid setting some pessimizing flag
https://github.com/llvm/llvm-project/pull/110720
More information about the llvm-commits
mailing list