[llvm] [SLP] Bail out on store-to-load forwarding hazards (PR #199606)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 8 06:02:20 PDT 2026
================
@@ -680,6 +680,15 @@ class LLVM_ABI TargetTransformInfoImplBase {
}
virtual unsigned getCacheLineSize() const { return 0; }
+
+ virtual InstructionCost getStoreLoadForwardingConflictCost(
+ Type *VecTy, TargetTransformInfo::TargetCostKind CostKind) const {
+ // No subtarget scheduling model is available here, so fall back to a
+ // conservative default STLF stall penalty (~10 cycles). Targets with a real
+ // scheduling model go through BasicTTIImpl and use their own value instead.
+ constexpr unsigned DefaultStoreLoadForwardingConflictCost = 10;
+ return InstructionCost(DefaultStoreLoadForwardingConflictCost);
----------------
alexey-bataev wrote:
Same value defined many times in different places, making it hard to maintain it
https://github.com/llvm/llvm-project/pull/199606
More information about the llvm-commits
mailing list