]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add comment to vect_estimate_min_profitable_iters
authorRichard Biener <rguenther@suse.de>
Tue, 10 Mar 2026 13:39:24 +0000 (14:39 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 28 Apr 2026 09:12:10 +0000 (11:12 +0200)
The following adds a comment how it's awkward to add the scalar loop
stmt cost vectors with scaled count to the vector loop cost vector
to estimate peeling costs.

* tree-vect-loop.cc (vect_estimate_min_profitable_iters):
Add comment about costing of prologue/epilogue.

gcc/tree-vect-loop.cc

index 94f3d00d60eca5365be94391f17d8271ab5082da..ee540028ba987f7afb73e2b05e991369c80d3471 100644 (file)
@@ -4130,6 +4130,11 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo,
        epilogue_need_br_taken_cost = true;
     }
 
+  /* The way we cummulate peeling costs into the vector prologue/epilogue
+     cost is a bit awkward given we cannot reuse scalar_costs which is
+     already computed and also because it cannot take into account any
+     epilogue vectorization we'll carry out in the end.  */
+
   stmt_info_for_cost *si;
   int j;
   /* Add costs associated with peel_iters_prologue.  */