[llvm] [LV] Add cross-part load overlap heuristic for interleaving (PR #214500)
Sergey Shcherbinin via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 06:45:45 PDT 2026
================
@@ -300,6 +302,23 @@ static cl::opt<bool> EnableLoadStoreRuntimeInterleave(
cl::desc(
"Enable runtime interleaving until load/store ports are saturated"));
+/// Enable cross-part load-overlap analysis during IC selection.
+static cl::opt<bool> EnableInterleaveCSE(
+ "enable-interleave-cse", cl::init(false), cl::Hidden,
+ cl::desc("Raise heuristic IC=1 to IC=2 when exact cross-part load overlap "
+ "predicts a downstream saving"));
+
+/// Minimum percentage of the modeled UF=2 body predicted to be saved.
+static cl::opt<unsigned> InterleaveCSEMinSavingPct(
+ "interleave-cse-min-pct", cl::init(5), cl::Hidden,
+ cl::desc("Minimum predicted downstream load saving as a percentage of the "
+ "modeled UF=2 vector loop body"));
+
+/// Minimum number of exact load overlaps required to request IC=2.
+static cl::opt<unsigned> InterleaveCSEMinOpportunities(
+ "interleave-cse-min-ops", cl::init(2), cl::Hidden,
+ cl::desc("Minimum number of exact cross-part load-overlap opportunities"));
----------------
SergeyShch01 wrote:
Agreed, all three were not needed. I removed the minimum-opportunity knob. The updated patch keeps only the opt-in enable flag and one profitability threshold based on predicted saved load cost relative to the modeled UF=2 loop cost.
https://github.com/llvm/llvm-project/pull/214500
More information about the llvm-commits
mailing list