]> gcc.gnu.org Git - gcc.git/commitdiff
RISC-V: Remove m_num_vector_iterations[NFC]
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Mon, 15 Jan 2024 10:35:07 +0000 (18:35 +0800)
committerLehua Ding <lehua.ding@rivai.ai>
Mon, 15 Jan 2024 11:02:33 +0000 (19:02 +0800)
Notice the m_num_vector_iterations is not used, remove the redundant codes.

Committed.

gcc/ChangeLog:

* config/riscv/riscv-vector-costs.cc (costs::analyze_loop_vinfo):
Remove m_num_vector_iterations.
* config/riscv/riscv-vector-costs.h: Ditto.

gcc/config/riscv/riscv-vector-costs.cc
gcc/config/riscv/riscv-vector-costs.h

index 1c3708f23a03cb3a9fdc81f11b572e7c14c4b81a..090275c7efeae5cafb1441b6d051e8ea6c5ebd36 100644 (file)
@@ -872,19 +872,6 @@ costs::costs (vec_info *vinfo, bool costing_for_scalar)
 void
 costs::analyze_loop_vinfo (loop_vec_info loop_vinfo)
 {
-  /* Record the number of times that the vector loop would execute,
-     if known.  */
-  class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-  auto scalar_niters = max_stmt_executions_int (loop);
-  if (scalar_niters >= 0)
-    {
-      unsigned int vf = vect_vf_for_cost (loop_vinfo);
-      if (LOOP_VINFO_LENS (loop_vinfo).is_empty ())
-       m_num_vector_iterations = scalar_niters / vf;
-      else
-       m_num_vector_iterations = CEIL (scalar_niters, vf);
-    }
-
   /* Detect whether we're vectorizing for VLA and should apply the unrolling
      heuristic described above m_unrolled_vls_niters.  */
   record_potential_vls_unrolling (loop_vinfo);
index 9bf041bb65c0423179ca592f40f751e595988c24..dc0d61f5d4a4b76af5ebafe718d9cc593fe7c396 100644 (file)
@@ -85,11 +85,6 @@ private:
   unsigned HOST_WIDE_INT m_unrolled_vls_niters = 0;
   unsigned HOST_WIDE_INT m_unrolled_vls_stmts = 0;
 
-  /* If we're vectorizing a loop that executes a constant number of times,
-     this variable gives the number of times that the vector loop would
-     iterate, otherwise it is zero.  */
-  uint64_t m_num_vector_iterations = 0;
-
   void analyze_loop_vinfo (loop_vec_info);
   void record_potential_vls_unrolling (loop_vec_info);
   bool prefer_unrolled_loop () const;
This page took 0.077519 seconds and 5 git commands to generate.