[llvm] [AMDGPU] Add support for point sample accel out of order returns (PR #127991)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 09:23:29 PST 2025
================
@@ -808,6 +812,29 @@ void WaitcntBrackets::setScoreByOperand(const MachineInstr *MI,
setScoreByInterval(Interval, CntTy, Score);
}
+// Return true if the subtarget is one that enables Point Sample Acceleration
+// and the MachineInstr passed in is one to which it might be applied (the
+// hardware makes this decision based on several factors, but we can't determine
+// this at compile time, so we have to assume it will be applied if the
+// instruction supports it).
+bool WaitcntBrackets::hasPointSampleAccel(const MachineInstr &MI) const {
+ if (!ST->hasPointSampleAccel() || !SIInstrInfo::isMIMG(MI))
+ return false;
+
+ const AMDGPU::MIMGInfo *Info = AMDGPU::getMIMGInfo(MI.getOpcode());
+ const AMDGPU::MIMGBaseOpcodeInfo *BaseInfo =
+ AMDGPU::getMIMGBaseOpcodeInfo(Info->BaseOpcode);
+ return BaseInfo->PointSampleAccel;
+}
+
+bool WaitcntBrackets::hasPointSamplePendingVmemTypes(
----------------
jayfoad wrote:
Needs a function comment.
https://github.com/llvm/llvm-project/pull/127991
More information about the llvm-commits
mailing list