[llvm] [MLGO] Count LR Evictions Rather than Relying on Cascade (PR #124440)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 10:48:17 PST 2025
================
@@ -657,7 +659,7 @@ bool MLEvictAdvisor::loadInterferenceFeatures(
// threshold, prevent the range from being evicted. We still let the
// range through if it is urgent as we are required to produce an
// eviction if the candidate is not spillable.
- if (IntfCascade >= MaxCascade && !Urgent)
+ if (VirtRegEvictionCounts[Intf->reg().id()] > MaxEvictionCount && !Urgent)
----------------
mtrofin wrote:
why is it guaranteed `VirtRegEvictionCounts` has a value for `Intf->reg().id()` - or you're saying "if one not available, it's 0 here, so OK"? if so, comment that. It makes it clear to the reader.
https://github.com/llvm/llvm-project/pull/124440
More information about the llvm-commits
mailing list