[llvm] [VPlan] First step towards VPlan cost modeling (LegacyCM in CostCtx) (PR #92555)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 03:51:08 PDT 2024
================
@@ -701,6 +716,27 @@ class VPLiveOut : public VPUser {
#endif
};
+/// Struct to hold various analysis needed for cost computations.
+struct VPCostContext {
+ const TargetTransformInfo &TTI;
+ VPTypeAnalysis Types;
+ LLVMContext &Ctx;
+ LoopVectorizationCostModel &CM;
+ SmallPtrSet<Instruction *, 8> SkipCostComputation;
+
+ VPCostContext(const TargetTransformInfo &TTI, Type *CanIVTy, LLVMContext &Ctx,
+ LoopVectorizationCostModel &CM)
+ : TTI(TTI), Types(CanIVTy, Ctx), Ctx(Ctx), CM(CM) {}
+
+ /// Return the cost for \p UI with \p VF using the legacy cost model until
+ /// computing the cost for all recipes has been migrated to VPlan.
----------------
fhahn wrote:
Updated, thanks!
https://github.com/llvm/llvm-project/pull/92555
More information about the llvm-commits
mailing list