[llvm] [VPlan] First step towards VPlan cost modeling (LegacyCM in CostCtx) (PR #92555)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun May 26 10:01:42 PDT 2024
    
    
  
================
@@ -730,6 +731,81 @@ void VPRegionBlock::execute(VPTransformState *State) {
   State->Instance.reset();
 }
 
+static InstructionCost computeCostForRecipe(VPRecipeBase *R, ElementCount VF,
----------------
ayalz wrote:
A public non-virtual `VPRecipeBase::cost()` or getCost() method can take care of skipping, forcing, or otherwise computing the cost of a recipe. The latter case can invoke a protected virtual `VPRecipeBase::computeCost()` which actually implements cost computations, with CM of underlying Instructions as default. Another naming option: computeCost() and computeCostImpl(). Otherwise the distinction between computeCostForRecipe() and Recipe::computeCost() needs to be explained.
https://github.com/llvm/llvm-project/pull/92555
    
    
More information about the llvm-commits
mailing list