[llvm-branch-commits] [llvm] [MachineLICM] Track peak register pressure when hoisting (PR #242431)

Shilei Tian via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Nov 14 08:04:12 PST 2026


================
@@ -163,13 +163,22 @@ namespace {
     // Track 'estimated' register pressure.
     SmallDenseSet<Register> RegSeen;
     SmallVector<unsigned, 8> RegPressure;
+    // Maximum estimate in the current block's scanned prefix.
+    SmallVector<unsigned, 8> PeakPressure;
 
     // Register pressure "limit" per register pressure set. If the pressure
     // is higher than the limit, then it's considered high.
     SmallVector<unsigned, 8> RegLimit;
 
+    struct RegPressureInfo {
----------------
shiltian wrote:

Great point!

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


More information about the llvm-branch-commits mailing list