[Mlir-commits] [mlir] [mlir] [memref] Compile-time memref.alloc Scheduling/Merging optimization (PR #95882)

donald chen llvmlistbot at llvm.org
Wed Jun 26 21:38:58 PDT 2024


cxy-1993 wrote:

> > OK, I see.To meet the constraint, we need to exclude all ops with branch semantics (or directly require all block size must be 1 in all regions)?
> 
> Something like that. If an Op
> 
> * has 1 or more regions
> * and access memory internally
> * and is not RegionBranchOpInterface
> 
> an error would be throw by this pass (in tick-based impl). As far as I know, there are similar restrictions on owner-based-buffer-deallocation. In your case, `cf.br` does not extend `RegionBranchOpInterface` interface, and will be excluded from this pass.
> 
> In the document of this PR, we have:
> 
> ```
> only RegionBranchOpInterface operations are allowed to access memref inside the operations' children regions.
> Other operaions containing regions should not access memref inside. Otherwise, a pass error could occur.
> ```

Thanks for the explanation. I'll be happy to continue reviewing the code once I have time.

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


More information about the Mlir-commits mailing list