[Mlir-commits] [mlir] [mlir][ArmSME] Use liveness information in the tile allocator (PR #90448)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon May 13 09:40:30 PDT 2024


================

----------------
banach-space wrote:

IMHO, this file is missing some basic cases. Well, more like cases showing live ranges. These two examples helped me a lot to better understand how live ranges are calculated:
```
func.func @basic(%cond: i1, %tile_1: vector<[4]x[4]xf32>, %tile_2: vector<[4]x[4]xf32>)
{
  cf.br ^bb2
^bb1:
  %tile = arm_sme.get_tile : vector<[4]x[4]xf32>
  "test.some_use"(%tile_1) : (vector<[4]x[4]xf32>) -> ()
  cf.br ^bb3
^bb2:
  %zero = arm_sme.zero : vector<[4]x[4]xf32>
  cf.cond_br %cond, ^bb1, ^bb3
^bb3:
  "test.some_use"(%zero) : (vector<[4]x[4]xf32>) -> ()
  return
}

// -----

func.func @basic(%tile_1: vector<[4]x[4]xf32>, %tile_2: vector<[4]x[4]xf32>)
{
  cf.br ^bb1
^bb1:
  cf.br ^bb2
^bb2:
  cf.br ^bb3
^bb3:
  "test.some_use"(%tile_1) : (vector<[4]x[4]xf32>) -> ()
  "test.some_use"(%tile_2) : (vector<[4]x[4]xf32>) -> ()
  return
}
```

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


More information about the Mlir-commits mailing list