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

Benjamin Maxwell llvmlistbot at llvm.org
Mon Jul 15 03:15:48 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,
----------------
MacDue wrote:

They're passed separately to avoid allocating a new vector (when I already have a vector of active live ranges, and a vector of overlapping inactive live ranges). `llvm::concat<LiveRange>` simply creates an iterator over both of those (without allocating a new vector). 

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


More information about the Mlir-commits mailing list