Message ID | 20230109225035.149190-1-juzhe.zhong@rivai.ai |
---|---|
State | New |
Headers | show |
Series | RISC-V: Avoid redundant flow in backward fusion | expand |
merged into another commit,, thanks. On Tue, Jan 10, 2023 at 6:51 AM <juzhe.zhong@rivai.ai> wrote: > From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai> > > gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc > (pass_vsetvl::backward_demand_fusion): Add pre-check to avoid redundant > flow. > > --- > gcc/config/riscv/riscv-vsetvl.cc | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/gcc/config/riscv/riscv-vsetvl.cc > b/gcc/config/riscv/riscv-vsetvl.cc > index 0ca1c51d121..a972c49561a 100644 > --- a/gcc/config/riscv/riscv-vsetvl.cc > +++ b/gcc/config/riscv/riscv-vsetvl.cc > @@ -2020,6 +2020,8 @@ pass_vsetvl::backward_demand_fusion (void) > > if (!backward_propagate_worthwhile_p (cfg_bb, curr_block_info)) > continue; > + > + if (cfg_bb == EXIT_BLOCK_PTR_FOR_FN (cfun)) > continue; > > edge e; > -- > 2.36.1 > >
diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index 0ca1c51d121..a972c49561a 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -2020,6 +2020,8 @@ pass_vsetvl::backward_demand_fusion (void) if (!backward_propagate_worthwhile_p (cfg_bb, curr_block_info)) continue; + + if (cfg_bb == EXIT_BLOCK_PTR_FOR_FN (cfun)) continue; edge e;
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai> gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::backward_demand_fusion): Add pre-check to avoid redundant flow. --- gcc/config/riscv/riscv-vsetvl.cc | 2 ++ 1 file changed, 2 insertions(+)