[Mlir-commits] [mlir] [mlir][dataflow] Fix DataFlowFramework crash by add isBlockEnd logic in the ProgramPoint::print (PR #173471)

lonely eagle llvmlistbot at llvm.org
Thu Dec 25 06:18:18 PST 2025


================
@@ -67,8 +67,10 @@ void ProgramPoint::print(raw_ostream &os) const {
        << OpWithFlags(getPrevOp(), OpPrintingFlags().skipRegions());
     return;
   }
-  os << "<before operation>:"
-     << OpWithFlags(getNextOp(), OpPrintingFlags().skipRegions());
+  if (!isBlockEnd()) {
----------------
linuxlonelyeagle wrote:

you can run `-test-dead-code-analysis -debug`, it will appear.I believe the programme point here is memref.store, whose nextOp is null.
```
func.func @trs(%idx1: index, %idx2: index, %s: f32) {
  scf.parallel (%i) = (%idx1) to (%idx2) step (%idx2) {
    %r = memref.alloca() : memref<10xf32>
    scf.forall (%e2) in (%idx2) {
      %a = memref.load %r[%idx2] : memref<10xf32>
    }
  }
  return
}
```

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


More information about the Mlir-commits mailing list