[llvm] [AMDGPU] Handle amdgpu.last.use metadata (PR #83816)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 02:05:42 PST 2024
================
@@ -2415,6 +2429,12 @@ bool SIGfx12CacheControl::enableVolatileAndOrNonTemporal(
return Changed;
}
+bool SIGfx12CacheControl::enableLastUse(MachineInstr &MI,
+ bool IsLastUse) const {
+ assert(MI.mayLoad() && !MI.mayStore());
+ return IsLastUse ? setTH(MI, AMDGPU::CPol::TH_LU) : false;
----------------
jayfoad wrote:
If you really want to do this on one line, it simplifies to `IsLastUse && setTH(MI, AMDGPU::CPol::TH_LU)`
https://github.com/llvm/llvm-project/pull/83816
More information about the llvm-commits
mailing list