[llvm] [VPlan] First step towards VPlan cost modeling. (PR #92555)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 03:19:33 PDT 2024


================
@@ -7300,6 +7295,161 @@ LoopVectorizationPlanner::plan(ElementCount UserVF, unsigned UserIC) {
   return VF;
 }
 
+InstructionCost VPCostContext::getLegacyCost(Instruction *UI,
+                                             ElementCount VF) const {
+  return CM.getInstructionCost(UI, VF).first;
+}
+
+InstructionCost VPCostContext::getLoopExitCost(ElementCount VF) {
----------------
fhahn wrote:

Move the pre-computations to LVP::cost together

https://github.com/llvm/llvm-project/pull/92555


More information about the llvm-commits mailing list