[Mlir-commits] [mlir] [mlir][ArmSME] Support filling liveness 'holes' in the tile allocator (PR #98350)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Jul 15 03:00:53 PDT 2024


https://github.com/banach-space commented:

Overall makes sense, but this needs some more documentation - we should be able to follow this without referring to:
* https://link.springer.com/content/pdf/10.1007/3-540-45937-5_17.pdf

I've already requested some small clarification inline, but am also asking for `allocateTilesToLiveRanges` to be documented more throughly. In particular, IIUC, this is the overall structure:

```cpp
for (LiveRange *nextRange : liveRangesSortedByStartPoint)

  // 1. Update the list of_active_  live ranges relative to `nextRange->start()`
  // 2. Update the list of _inactive_ live ranges relative to `nextRange->start()`
  
  // 3. Get the list of overlapping inactive live ranges
  // The list of inactive live ranges contains a list of _candidates_ to "borrow" tileID from. However, when updating `inactiveRanges` in step 2, we only looked at the starting point of the current range (i.e. `nextRange->start()`). We need to refine the list by excluding "overlapping" ranges. The tileIDs from overlapping ranges are re-acquired to flag them as "in use".
  
  // 4. Either acquire an available tileID or `newRange` or obtain one through spilling.
  
  // 5. Following step 3., re-release tileIDs corresponding to inactive live ranges
```

If this correct? If not, please refine. In any case, please make sure that key step in this method are clearly documented.

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


More information about the Mlir-commits mailing list