[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:27:16 PDT 2024


================
@@ -488,76 +501,126 @@ coalesceTileLiveRanges(DenseMap<Value, LiveRange> &initialLiveRanges) {
   return std::move(coalescedLiveRanges);
 }
 
-/// Choose a live range to spill (via some heuristics). This picks either an
-/// active live range from `activeRanges` or the new live range `newRange`.
+/// Choose a live range to spill (via some heuristics). This picks either a live
+/// range from `activeRanges`, `inactiveRanges`, or the new live range
+/// `newRange`. Note: All live ranges in `activeRanges` and `inactiveRanges` are
+/// assumed to overlap with `newRange`.
 LiveRange *chooseSpillUsingHeuristics(ArrayRef<LiveRange *> activeRanges,
+                                      ArrayRef<LiveRange *> inactiveRanges,
----------------
banach-space wrote:

Why couldn't we concat before calling this method? The type would be grim ...

Perhaps rename as
```cpp
LiveRange *chooseSpillUsingHeuristics(ArrayRef<LiveRange *> firstRange, LiveRange *chooseSpillUsingHeuristics(ArrayRef<LiveRange *> secondRange)
 ```
 ? And then add a comment that "this method doesn't care, but this is easier to pass as an argument"? I just find referring to "active"/"inactive" in this hook super confusing (while it shouldn't be - this method doesn't care).

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


More information about the Mlir-commits mailing list