[llvm] [VPlan] Return Max from computeCost without underlying instrs. (PR #109708)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 07:01:44 PDT 2024
================
@@ -844,7 +844,9 @@ class VPRecipeBase : public ilist_node_with_parent<VPRecipeBase, VPBasicBlock>,
protected:
/// Compute the cost of this recipe either using a recipe's specialized
/// implementation or using the legacy cost model and the underlying
- /// instructions.
+ /// instructions. Returns InstructionCost::max() if the cost of this recipe
----------------
ayalz wrote:
> Alternatively computeCost could return an optional cost.
Perhaps better to return no cost at all, as in optional, when cost should be ignored, rather than a max sentinel. The latter requires additional attention to remain unmodified, preventing (mistaken) updates.
https://github.com/llvm/llvm-project/pull/109708
More information about the llvm-commits
mailing list