[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:43 PDT 2024
================
@@ -275,20 +275,15 @@ void VPRecipeBase::moveBefore(VPBasicBlock &BB,
}
/// Return the underlying instruction to be used for computing \p R's cost via
-/// the legacy cost model. Return nullptr if there's no suitable instruction.
+/// the legacy cost model. Return nullptr if there's no suitable instruction or
+/// computeCost is already implemented for the recipe and there is no need for
+/// the underlying instruction, i.e. it does not need to be skipped for cost
+/// computations.
----------------
ayalz wrote:
The gotten Instruction For Cost is used for (a) computing cost via legacy model - zero or greater, valid or not, (b) skipping cost - valid zero cost is used if skipped, (c) qualifying for Forced cost overwriting - valid zero cost is used if unqualified. All uses agree on UI or null?
https://github.com/llvm/llvm-project/pull/109708
More information about the llvm-commits
mailing list