[llvm] [RegAllocEvictAdvisor] Add minimum weight ratio heuristic. (PR #98109)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 21:03:40 PDT 2024


================
@@ -157,6 +163,10 @@ bool DefaultEvictionAdvisor::shouldEvict(const LiveInterval &A, bool IsHint,
     return true;
 
   if (A.weight() > B.weight()) {
+    float WeightRatio = A.weight() / B.weight();
----------------
mtrofin wrote:

can `B.weight()` be 0?

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


More information about the llvm-commits mailing list