]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Eliminate redundant vsetvli for duplicate AVL def
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Sun, 23 Apr 2023 12:18:59 +0000 (20:18 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Mon, 24 Apr 2023 06:18:55 +0000 (14:18 +0800)
commitff8f95449350372b584cfcd28a7d9d71f52eea50
tree428cdc6d4a3813e83398bed776afc7c1b89115ad
parentc5a1fa59ae3f44059a79086cbc506800d4149b69
RISC-V: Eliminate redundant vsetvli for duplicate AVL def

This patch is the V2 patch:https://patchwork.sourceware.org/project/gcc/patch/20230328010124.235703-1-juzhe.zhong@rivai.ai/

Address comments from Jeff. Add comments for all_avail_in_compatible_p and refine comments of codes.

gcc/ChangeLog:

* config/riscv/riscv-vsetvl.cc
(vector_infos_manager::all_avail_in_compatible_p): New function.
(pass_vsetvl::refine_vsetvls): Optimize vsetvls.
* config/riscv/riscv-vsetvl.h: New function.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/vsetvl/avl_single-102.c: New test.
gcc/config/riscv/riscv-vsetvl.cc
gcc/config/riscv/riscv-vsetvl.h
gcc/testsuite/gcc.target/riscv/rvv/vsetvl/avl_single-102.c [new file with mode: 0644]