[llvm] [AMDGPU] Avoid bundling memops in a MBB if the MBB contains a SCHED_BARRIER (PR #153533)

Yoonseo Choi via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 15 20:57:42 PDT 2025


================
@@ -179,20 +179,20 @@ bool SIPostRABundler::run(MachineFunction &MF) {
         Next = std::next(I);
 
         assert(BundleEnd != I);
-        if (canBundle(*BundleEnd, *I)) {
-          BundleEnd = I;
-          if (I->getNumExplicitDefs() != 0)
-            Defs.insert(I->defs().begin()->getReg());
-          ++ClauseLength;
-        } else if (!I->isMetaInstruction()) {
-          // Allow meta instructions in between bundle candidates, but do not
-          // start or end a bundle on one.
-          //
-          // TODO: It may be better to move meta instructions like dbg_value
-          // after the bundle. We're relying on the memory legalizer to unbundle
-          // these.
+        if (!canBundle(*BundleEnd, *I)) {
----------------
yoonseoch wrote:

Made the change in postra-bundler to bypass such MBBs. 

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


More information about the llvm-commits mailing list