RISC-V: Refine codes in backward fusion [NFC]
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Mon, 9 Jan 2023 22:47:26 +0000 (06:47 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Thu, 26 Jan 2023 19:10:16 +0000 (03:10 +0800)
This NFC patch is preparing for the following patches.
gcc/ChangeLog:

* config/riscv/riscv-vsetvl.cc (pass_vsetvl::backward_demand_fusion): Refine codes.

gcc/config/riscv/riscv-vsetvl.cc

index 9140b18..f9dd7ca 100644 (file)
@@ -2011,15 +2011,15 @@ pass_vsetvl::backward_demand_fusion (void)
   for (const bb_info *bb : crtl->ssa->reverse_bbs ())
     {
       basic_block cfg_bb = bb->cfg_bb ();
-      const auto &prop
-       = m_vector_manager->vector_block_infos[cfg_bb->index].local_dem;
+      const auto &curr_block_info
+       = m_vector_manager->vector_block_infos[cfg_bb->index];
+      const auto &prop = curr_block_info.local_dem;
 
       /* If there is nothing to propagate, just skip it.  */
       if (!prop.valid_or_dirty_p ())
        continue;
 
-      if (!backward_propagate_worthwhile_p (
-           cfg_bb, m_vector_manager->vector_block_infos[cfg_bb->index]))
+      if (!backward_propagate_worthwhile_p (cfg_bb, curr_block_info))
        continue;
 
       edge e;