[all-commits] [llvm/llvm-project] fbe630: [mlir][bufferization] Handle arith.select-based de...

Krish Gupta via All-commits all-commits at lists.llvm.org
Tue Jul 14 11:56:41 PDT 2026


  Branch: refs/heads/users/KrxGu/arith-select-dealloc
  Home:   https://github.com/llvm/llvm-project
  Commit: fbe630086b549c739d2c2686804a5ec9afd0b13c
      https://github.com/llvm/llvm-project/commit/fbe630086b549c739d2c2686804a5ec9afd0b13c
  Author: KrxGu <krishom70 at gmail.com>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M mlir/lib/Dialect/Bufferization/Transforms/StaticMemoryPlannerAnalysis.cpp
    M mlir/test/Dialect/Bufferization/Transforms/static-memory-planner-analysis.mlir

  Log Message:
  -----------
  [mlir][bufferization] Handle arith.select-based deallocs in static memory planner

Allocs freed indirectly via arith.select chains were previously skipped.
This adds forward select-chain traversal so patterns like:
  %2 = arith.select %c, %0, %1
  memref.dealloc %2
are now handled correctly.

A group constraint ensures that all allocs sharing a select-based
dealloc are either all placed in the arena or all skipped — putting
one alloc in while leaving its peer out would break the dealloc.

Also fixes the O(n*m) block scan in buildAllocInfos by doing a single
upfront pass with a DenseMap index.

Tests added for single-alloc select, shared select-dealloc, and the
two-select two-dealloc pattern.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list