[llvm] [CodeGen] [EarlyIfConversion] Prioritize conversion of hard to predict branches (PR #174457)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 03:58:04 PST 2026


================
@@ -963,12 +1077,31 @@ bool EarlyIfConverter::shouldConvertIf() {
   unsigned MinCrit = std::min(TBBTrace.getCriticalPath(),
                               FBBTrace.getCriticalPath());
 
-  // Set a somewhat arbitrary limit on the critical path extension we accept.
-  unsigned CritLimit = SchedModel.MispredictPenalty/2;
+  // Set a limit on the critical path extension we accept.
----------------
fhahn wrote:

```suggestion
  // Set a somewhat arbitrary limit on the critical path extension we accept.
```

limit is still somewhat arbitrary?

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


More information about the llvm-commits mailing list