RISC-V: Add probability model of each block to prevent endless loop of Phase 3
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Mon, 9 Jan 2023 23:17:20 +0000 (07:17 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Thu, 26 Jan 2023 19:10:16 +0000 (03:10 +0800)
commitacc10c793127d5683b19158fd89fd0d4f4fc9db0
tree4cb9a210b0cbac10f5fef854f9a06827c6439344
parent7ae4d1dfb8f43b99aea4e86e3ec8e48e9480045f
RISC-V: Add probability model of each block to prevent endless loop of Phase 3

Notice that the PASS is just simpily pick the probability >= 50%
to do the backward fusion which will create endless loop on Phase 3.

Adding this probability to fix this bug.
gcc/ChangeLog:

* config/riscv/riscv-vsetvl.cc
(vector_infos_manager::vector_infos_manager): Add probability.
(vector_infos_manager::dump): Ditto.
(pass_vsetvl::compute_probabilities): Ditto.
* config/riscv/riscv-vsetvl.h (struct vector_block_info): Ditto.
gcc/config/riscv/riscv-vsetvl.cc
gcc/config/riscv/riscv-vsetvl.h