[llvm] [AMDGPU] Track DS prefetch flush points on single-path loop. (PR #227274)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 05:55:27 PDT 2026


================
@@ -3261,6 +3261,37 @@ bool SIInsertWaitcnts::mayStoreIncrementingDSCNT(const MachineInstr &MI) const {
   return MI.mayStore() && SIInstrInfo::isDS(MI);
 }
 
+// Issue order when the body has no in-loop branch: header, then each block's
+// one in-loop successor. Returns false if that walk is not the whole loop.
+static bool
+appendSinglePathLoopBlocks(const MachineLoop &ML,
+                           SmallVectorImpl<MachineBasicBlock *> &Order) {
+  MachineBasicBlock *Header = ML.getHeader();
+  if (!Header)
+    return false;
+
+  MachineBasicBlock *BB = Header;
+  SmallPtrSet<MachineBasicBlock *, 8> Seen;
+  do {
----------------
arsenm wrote:

I don't really expect to see a new type of CFG walk in this pass 

https://github.com/llvm/llvm-project/pull/227274


More information about the llvm-commits mailing list