[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:02 PST 2026
================
@@ -55,10 +56,25 @@ BlockInstrLimit("early-ifcvt-limit", cl::init(30), cl::Hidden,
static cl::opt<bool> Stress("stress-early-ifcvt", cl::Hidden,
cl::desc("Turn all knobs to 11"));
+// Enable analysis of hard-to-predict branches (conditions derived from loads).
+static cl::opt<bool> EnableHardToPredictAnalysis(
+ "enable-early-ifcvt-hard-to-predict", cl::Hidden, cl::init(true),
+ cl::desc("Enable hard-to-predict branch analysis for if-conversion"));
+
+// Limit the number steps we take when searching conditions that depend on
+// values recently loaded from memory
----------------
fhahn wrote:
this should clarify what recently means. We walk from uses to defs, and I don't think anything currently checks for any metric of 'recently' (values could be very far away, there could be super long running loops between them etc)?
https://github.com/llvm/llvm-project/pull/174457
More information about the llvm-commits
mailing list