[llvm] [LV] Factor out VF-independent code from cost model (NFC). (PR #192426)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 21 04:49:50 PDT 2026
================
@@ -34,22 +35,46 @@ class GeneratedRTChecks;
namespace llvm {
+class AssumptionCache;
class LoopInfo;
class DominatorTree;
class LoopVectorizationLegality;
class LoopVectorizationCostModel;
class PredicatedScalarEvolution;
class LoopVectorizeHints;
+class RecurrenceDescriptor;
class LoopVersioning;
class OptimizationRemarkEmitter;
-class TargetTransformInfo;
class TargetLibraryInfo;
class VPRecipeBuilder;
struct VPRegisterUsage;
struct VFRange;
extern cl::opt<bool> EnableVPlanNativePath;
extern cl::opt<unsigned> ForceTargetInstructionCost;
+extern cl::opt<bool> PreferInLoopReductions;
+
+/// \return An upper bound for vscale based on TTI or the vscale_range
+/// attribute.
+std::optional<unsigned> getMaxVScale(const Function &F,
+ const TargetTransformInfo &TTI);
+
+/// Write a \p DebugMsg about vectorization to the debug output stream. If \p I
+/// is passed, the message relates to that particular instruction.
+#ifndef NDEBUG
+void debugVectorizationMessage(const StringRef Prefix, const StringRef DebugMsg,
+ Instruction *I);
+#endif
+
+/// Reports an informative message: print \p Msg for debugging purposes as well
+/// as an optimization remark. Uses either \p I as location of the remark, or
+/// otherwise \p TheLoop. If \p DL is passed, use it as debug location for the
+/// remark. \p PassName is the name to use for the optimization remark.
+void reportVectorizationInfo(const char *PassName, const StringRef Msg,
+ const StringRef ORETag,
----------------
fhahn wrote:
those have been moved back to LoopVectorize.cpp
https://github.com/llvm/llvm-project/pull/192426
More information about the llvm-commits
mailing list