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

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 00:18:41 PDT 2024


================
@@ -44,6 +44,12 @@ static cl::opt<bool> EnableLocalReassignment(
              "may be compile time intensive"),
     cl::init(false));
 
+static cl::opt<float> MinWeightRatioNeededToEvictHint(
+    "min-weight-ratio-needed-to-evict-hint", cl::Hidden,
+    cl::desc("The minimum ration of weights needed in order for the live range with bigger weight to evict the other live range which"
+    "satisfies a hint),
+    cl::init(7.5));
----------------
qcolombet wrote:

To add on what @mtrofin said, could you explain the rationale for `7.5`?

It feels random to me.

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


More information about the llvm-commits mailing list